Class: Tinychef::NodeRun
- Inherits:
-
Object
- Object
- Tinychef::NodeRun
- Defined in:
- lib/tinychef/node_run.rb
Defined Under Namespace
Classes: OptionsError
Constant Summary collapse
- RECIPES_DIR =
"recipes"
Instance Attribute Summary collapse
-
#dest ⇒ Object
readonly
Returns the value of attribute dest.
-
#node ⇒ Object
readonly
Returns the value of attribute node.
-
#run_list ⇒ Object
readonly
Returns the value of attribute run_list.
-
#run_list_command ⇒ Object
readonly
Returns the value of attribute run_list_command.
Instance Method Summary collapse
-
#initialize(options) ⇒ NodeRun
constructor
A new instance of NodeRun.
- #start ⇒ Object
Constructor Details
#initialize(options) ⇒ NodeRun
Returns a new instance of NodeRun.
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/tinychef/node_run.rb', line 26 def initialize() node = [:node] dest = [:dest] run_list = [:run_list] @node = Tinychef::Node.new(node) @dest = Tinychef::Destination.new(dest || @node.host) @run_list = run_list prepare_run_list_command rescue => e puts e.inspect raise OptionsError end |
Instance Attribute Details
#dest ⇒ Object (readonly)
Returns the value of attribute dest.
24 25 26 |
# File 'lib/tinychef/node_run.rb', line 24 def dest @dest end |
#node ⇒ Object (readonly)
Returns the value of attribute node.
24 25 26 |
# File 'lib/tinychef/node_run.rb', line 24 def node @node end |
#run_list ⇒ Object (readonly)
Returns the value of attribute run_list.
24 25 26 |
# File 'lib/tinychef/node_run.rb', line 24 def run_list @run_list end |
#run_list_command ⇒ Object (readonly)
Returns the value of attribute run_list_command.
24 25 26 |
# File 'lib/tinychef/node_run.rb', line 24 def run_list_command @run_list_command end |
Instance Method Details
#start ⇒ Object
43 44 45 46 47 48 |
# File 'lib/tinychef/node_run.rb', line 43 def start sync_files ensure_remote_data_bag_file_exits run_code remove_files end |