Class: Chef::Knife::SoloPrepare
Overview
Instance Method Summary
collapse
#generate_node_config, included, load_deps, #node_config, #node_environment, #node_name, #nodes_path
#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
#chef_version ⇒ Object
74
75
76
77
78
79
80
|
# File 'lib/chef/knife/solo_prepare.rb', line 74
def chef_version
if (v = Chef::Config[:knife][:bootstrap_version])
v.empty? ? nil : v
else
Chef::VERSION
end
end
|
#operating_system ⇒ Object
70
71
72
|
# File 'lib/chef/knife/solo_prepare.rb', line 70
def operating_system
run_command('uname -s').stdout.strip
end
|
#run ⇒ Object
50
51
52
53
54
55
56
57
58
59
|
# File 'lib/chef/knife/solo_prepare.rb', line 50
def run
if config[:omnibus_version]
ui.warn '`--omnibus-version` is deprecated, please use `--bootstrap-version`.'
Chef::Config[:knife][:bootstrap_version] = config[:omnibus_version]
end
validate!
bootstrap.bootstrap!
generate_node_config
end
|
#validate! ⇒ Object
61
62
63
|
# File 'lib/chef/knife/solo_prepare.rb', line 61
def validate!
validate_ssh_options!
end
|