Class: Pantry::Chef::RunChefSolo
- Inherits:
-
Pantry::Command
- Object
- Pantry::Command
- Pantry::Chef::RunChefSolo
- Defined in:
- lib/pantry/chef/run_chef_solo.rb
Overview
Execute ChefSolo on the current box, returning STDOUT, STDERR, and status code.
Instance Method Summary collapse
Instance Method Details
#perform(message) ⇒ Object
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/pantry/chef/run_chef_solo.rb', line 7 def perform() begin solo_rb = Pantry.root.join("etc", "chef", "solo.rb") stdout, stderr, status = Open3.capture3("chef-solo --config #{solo_rb}") [stdout, stderr, status.to_i] rescue Exception => e # Could not find the chef-solo binary ["", e., 1] end end |