Class: Chef::Knife::BootstrapWindowsSsh

Inherits:
Bootstrap
  • Object
show all
Includes:
BootstrapWindowsBase
Defined in:
lib/chef/knife/bootstrap_windows_ssh.rb

Instance Method Summary collapse

Methods included from BootstrapWindowsBase

#bootstrap, included, #load_template, #render_template

Instance Method Details

#runObject



74
75
76
# File 'lib/chef/knife/bootstrap_windows_ssh.rb', line 74

def run
  bootstrap
end

#run_command(command = '') ⇒ Object



78
79
80
81
82
83
84
85
86
87
88
89
# File 'lib/chef/knife/bootstrap_windows_ssh.rb', line 78

def run_command(command = '')
  ssh = Chef::Knife::Ssh.new
  ssh.name_args = [ server_name, command ]
  ssh.config[:ssh_user] = locate_config_value(:ssh_user)
  ssh.config[:ssh_password] = locate_config_value(:ssh_password)
  ssh.config[:ssh_port] = locate_config_value(:ssh_port)
  ssh.config[:ssh_gateway] =  locate_config_value(:ssh_gateway)
  ssh.config[:identity_file] = config[:identity_file]
  ssh.config[:manual] = true
  ssh.config[:host_key_verify] = config[:host_key_verify]
  ssh.run
end