Class: Tinychef::NodeRun
- Inherits:
-
Object
- Object
- Tinychef::NodeRun
- Defined in:
- lib/tinychef/node_run.rb
Constant Summary collapse
- OPTIONS_ERROR =
<<-EOH Required arguments: NODE: node file to execute DEST: ssh username@host string to use to connect to host. If missing, this is guessed by the node file name. RUN_LIST: an optional RUN_LIST to be passed to chef-solo executable. EOH
- 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.
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/tinychef/node_run.rb', line 22 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 raise OptionsError.new NodeRun::OPTIONS_ERROR end |
Instance Attribute Details
#dest ⇒ Object (readonly)
Returns the value of attribute dest.
20 21 22 |
# File 'lib/tinychef/node_run.rb', line 20 def dest @dest end |
#node ⇒ Object (readonly)
Returns the value of attribute node.
20 21 22 |
# File 'lib/tinychef/node_run.rb', line 20 def node @node end |
#run_list ⇒ Object (readonly)
Returns the value of attribute run_list.
20 21 22 |
# File 'lib/tinychef/node_run.rb', line 20 def run_list @run_list end |
#run_list_command ⇒ Object (readonly)
Returns the value of attribute run_list_command.
20 21 22 |
# File 'lib/tinychef/node_run.rb', line 20 def run_list_command @run_list_command end |
Instance Method Details
#start ⇒ Object
38 39 40 41 42 43 |
# File 'lib/tinychef/node_run.rb', line 38 def start sync_files ensure_remote_data_bag_file_exits run_code remove_files end |