Class: Chef::Knife::SoloCook

Inherits:
Object
  • Object
show all
Defined in:
lib/capistrano-knife-solo.rb

Instance Method Summary collapse

Instance Method Details

#cookObject



57
58
59
60
61
62
63
# File 'lib/capistrano-knife-solo.rb', line 57

def cook
  # run the knife-solo cook command
  vendor_cook
  # clean up after the config we created
  ui.msg "Removing temporary Node config '#{node_config}'..."
  FileUtils.rm_r node_config
end

#node_configObject



65
66
67
68
69
70
# File 'lib/capistrano-knife-solo.rb', line 65

def node_config
  # create the directory first as it's tmp and may not exist
  FileUtils.mkdir_p Pathname.new(Chef::Config[:node_path])
  # don't default to using args for the path
  Pathname.new("#{nodes_path}/#{node_name}.json")
end

#vendor_cookObject



55
# File 'lib/capistrano-knife-solo.rb', line 55

alias vendor_cook cook