Skip to content

Commit

Permalink
Added --secret-file option
Browse files Browse the repository at this point in the history
Added `--secret-file` option, as available in `knife bootstrap` http://docs.getchef.com/knife_bootstrap.html#options
to enable upload of secret file during bootstrap.
  • Loading branch information
arr-dev committed Aug 18, 2014
1 parent 284923e commit fe43ac8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/chef/knife/cloudstack_server_create.rb
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,12 @@ class CloudstackServerCreate < Knife
:long => "--hypervisor HYPERVISOR",
:description => "the hypervisor on which to deploy the virtual machine",
:default => nil


option :secret_file,
:long => "--secret-file FILE",
:description => "the path to the file that contains the encryption key",
:default => nil

# def bootstrap_for_node(host, user, password)
def bootstrap_for_node(server, ssh_host)
Expand All @@ -181,6 +187,7 @@ def bootstrap_for_node(server, ssh_host)
bootstrap.config[:use_sudo] = true
bootstrap.config[:template_file] = locate_config_value(:template_file)
bootstrap.config[:environment] = config[:environment]
bootstrap.config[:secret_file] = locate_config_value(:secret_file)
# may be needed for vpc_mode
bootstrap.config[:no_host_key_verify] = config[:no_host_key_verify]
begin
Expand Down

0 comments on commit fe43ac8

Please sign in to comment.