Skip to content

Commit 806bc87

Browse files
committed
Adding "bootstrap-wget-options" option
Adding "bootstrap-wget-options" option with "knife cs server create" command to take wget options in-line, so that some common error like ssl error while downloading chef-client on new vm can be avoided by using "bootstrap-wget-options --no-check-certificate" in-line option.
1 parent 1b42e58 commit 806bc87

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/chef/knife/cs_server_create.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,11 @@ class CsServerCreate < Chef::Knife
235235
:description => "Set the same server display name as Chef node name.",
236236
:boolean => true,
237237
:default => false
238+
239+
option :bootstrap_wget_options,
240+
:long => "--bootstrap-wget-options OPTIONS",
241+
:description => "Add options to wget when installing chef-client",
242+
:proc => Proc.new { |wo| Chef::Config[:knife][:bootstrap_wget_options] = wo }
238243

239244

240245
def run
@@ -610,6 +615,7 @@ def bootstrap_common_params(bootstrap)
610615
bootstrap.config[:template_file] = locate_config_value(:template_file)
611616
bootstrap.config[:first_boot_attributes] = locate_config_value(:first_boot_attributes)
612617
bootstrap.config[:environment] = locate_config_value(:environment)
618+
bootstrap.config[:bootstrap_wget_options] = locate_config_value(:bootstrap_wget_options)
613619
bootstrap
614620
end
615621

0 commit comments

Comments
 (0)