Class: ServerTools::Bootstrap

Inherits:
Object
  • Object
show all
Defined in:
lib/server_tools/bootstrap.rb

Instance Method Summary collapse

Constructor Details

#initialize(hostname, options) ⇒ Bootstrap

Returns a new instance of Bootstrap.



3
4
5
6
# File 'lib/server_tools/bootstrap.rb', line 3

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

Instance Method Details

#commandObject



8
9
10
11
12
13
14
15
16
17
# File 'lib/server_tools/bootstrap.rb', line 8

def command
  [
    "knife bootstrap #{hostname}",
    "--identity-file #{options[:identity_file]}",
    "--ssh-port #{options[:ssh_port]}",
    "--ssh-user #{options[:ssh_user]}",
    "--sudo",
    "--local-mode"
  ].join(' ')
end