Class: Stemcell::MetadataLauncher
- Inherits:
-
Object
- Object
- Stemcell::MetadataLauncher
- Defined in:
- lib/stemcell/metadata_launcher.rb
Instance Attribute Summary collapse
-
#chef_root ⇒ Object
readonly
Returns the value of attribute chef_root.
-
#interactive ⇒ Object
Returns the value of attribute interactive.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
Instance Method Summary collapse
- #default_options ⇒ Object
-
#initialize(options = {}) ⇒ MetadataLauncher
constructor
A new instance of MetadataLauncher.
- #run!(role, override_options = {}) ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ MetadataLauncher
Returns a new instance of MetadataLauncher.
8 9 10 11 12 13 14 15 |
# File 'lib/stemcell/metadata_launcher.rb', line 8 def initialize(={}) @chef_root = [:chef_root] @interactive = .fetch(:interactive, false) raise ArgumentError, "You must specify chef_root" unless chef_root @source = MetadataSource.new(chef_root) end |
Instance Attribute Details
#chef_root ⇒ Object (readonly)
Returns the value of attribute chef_root.
3 4 5 |
# File 'lib/stemcell/metadata_launcher.rb', line 3 def chef_root @chef_root end |
#interactive ⇒ Object
Returns the value of attribute interactive.
4 5 6 |
# File 'lib/stemcell/metadata_launcher.rb', line 4 def interactive @interactive end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
6 7 8 |
# File 'lib/stemcell/metadata_launcher.rb', line 6 def source @source end |
Instance Method Details
#default_options ⇒ Object
26 27 28 |
# File 'lib/stemcell/metadata_launcher.rb', line 26 def source. end |
#run!(role, override_options = {}) ⇒ Object
17 18 19 20 21 22 23 24 |
# File 'lib/stemcell/metadata_launcher.rb', line 17 def run!(role, ={}) environment = () = (role, environment, ) () describe_instance() invoke_launcher() end |