Class: ServerTools::Provision

Inherits:
Object
  • Object
show all
Includes:
SSH
Defined in:
lib/server_tools/provision.rb

Instance Method Summary collapse

Methods included from SSH

#ssh_opts

Constructor Details

#initialize(hostname, options) ⇒ Provision

Returns a new instance of Provision.



6
7
8
9
# File 'lib/server_tools/provision.rb', line 6

def initialize(hostname, options)
  @hostname = hostname
  @options = options
end

Instance Method Details

#commandObject



11
12
13
14
15
16
17
18
# File 'lib/server_tools/provision.rb', line 11

def command
  [
    "ssh #{hostname}",
    "-t -t",
    "#{ssh_opts(options)}",
    "sudo /usr/bin/chef-client #{options[:chef_client_flags]}"
  ].join(' ')
end