Class: ChefWorkflow::VM::ChefServerProvisioner
Constant Summary
DebugSupport::CHEF_WORKFLOW_DEBUG_DEFAULT
Instance Attribute Summary collapse
Instance Method Summary
collapse
#init_knife_plugin
#if_debug
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
10
11
12
|
# File 'lib/chef-workflow/support/vm/chef_server.rb', line 10
def name
@name
end
|
Instance Method Details
#report ⇒ Object
35
36
37
|
# File 'lib/chef-workflow/support/vm/chef_server.rb', line 35
def report
[name]
end
|
#shutdown ⇒ Object
31
32
33
|
# File 'lib/chef-workflow/support/vm/chef_server.rb', line 31
def shutdown
true
end
|
#startup(*args) ⇒ Object
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
# File 'lib/chef-workflow/support/vm/chef_server.rb', line 12
def startup(*args)
require 'chef-workflow/support/knife'
require 'chef/knife/ssh' require 'chef/knife/server_bootstrap_standalone'
ip = args.first.first
raise "No IP to use for the chef server" unless ip
args = %W[--node-name test-chef-server --host #{ip}]
args += %W[--ssh-user #{ChefWorkflow::KnifeSupport.ssh_user}] if ChefWorkflow::KnifeSupport.ssh_user
args += %W[--ssh-password #{ChefWorkflow::KnifeSupport.ssh_password}] if ChefWorkflow::KnifeSupport.ssh_password
args += %W[--identity-file #{ChefWorkflow::KnifeSupport.ssh_identity_file}] if ChefWorkflow::KnifeSupport.ssh_identity_file
init_knife_plugin(Chef::Knife::ServerBootstrapStandalone, args).run
true
end
|