Class: Chef::Knife::SoloBootstrap

Inherits:
Chef::Knife show all
Includes:
KnifeSolo::SshCommand
Defined in:
lib/chef/knife/solo_bootstrap.rb

Instance Method Summary collapse

Methods included from KnifeSolo::SshCommand

#ask_password, #config_file_options, #config_files, #connection_options, #custom_sudo_command, #detect_authentication_method, #first_cli_arg_is_a_hostname?, #host, #host_descriptor, #identity_file, included, load_deps, #password, #process_startup_file, #process_sudo, #processed_command, #run_command, #run_portable_mkdir_p, #run_with_fallbacks, #ssh_args, #ssh_connection, #ssh_control_path, #standard_sudo_command, #startup_script, #stream_command, #sudo_available?, #sudo_command, #try_connection, #user, #validate_ssh_options!, #windows_node?

Instance Method Details

#command_with_same_args(klass) ⇒ Object



39
40
41
42
43
44
45
# File 'lib/chef/knife/solo_bootstrap.rb', line 39

def command_with_same_args(klass)
  cmd = klass.new
  cmd.ui = ui
  cmd.name_args = @name_args
  cmd.config.merge! config
  cmd
end

#runObject



24
25
26
27
28
29
30
31
32
33
# File 'lib/chef/knife/solo_bootstrap.rb', line 24

def run
  validate!

  prepare = command_with_same_args(SoloPrepare)
  prepare.run

  cook = command_with_same_args(SoloCook)
  cook.config[:chef_check] = false
  cook.run
end

#validate!Object



35
36
37
# File 'lib/chef/knife/solo_bootstrap.rb', line 35

def validate!
  validate_ssh_options!
end