diff options
author | Tim Smith <tsmith@chef.io> | 2020-04-04 08:30:05 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-04 08:30:05 -0700 |
commit | d9b7a7f93e0a6a5c6e587d7b1bf4fbb0689858ac (patch) | |
tree | e32a636d3e423a779a46f5ba90cf8a915f05840c | |
parent | b38fd9279841c61e09926a85f9ba90b3313cdd0c (diff) | |
parent | 33547ea63ac5fe07cb4f1b2e17a54d1e4527ce52 (diff) | |
download | chef-d9b7a7f93e0a6a5c6e587d7b1bf4fbb0689858ac.tar.gz |
Merge pull request #9596 from cinc-project/dist_windows_bootstrap_template
Dist windows bootstrap template - fix msi_url
-rw-r--r-- | lib/chef/knife/bootstrap.rb | 2 | ||||
-rw-r--r-- | lib/chef/knife/bootstrap/templates/windows-chef-client-msi.erb | 8 | ||||
-rw-r--r-- | lib/chef/knife/core/windows_bootstrap_context.rb | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/lib/chef/knife/bootstrap.rb b/lib/chef/knife/bootstrap.rb index 3279f7970a..3fe2ec5d71 100644 --- a/lib/chef/knife/bootstrap.rb +++ b/lib/chef/knife/bootstrap.rb @@ -467,7 +467,7 @@ class Chef # @return [String] Default bootstrap template def default_bootstrap_template if connection.windows? - "windows-#{Chef::Dist::CLIENT}-msi" + "windows-chef-client-msi" else "chef-full" end diff --git a/lib/chef/knife/bootstrap/templates/windows-chef-client-msi.erb b/lib/chef/knife/bootstrap/templates/windows-chef-client-msi.erb index 3fe397ed9e..b4da79e453 100644 --- a/lib/chef/knife/bootstrap/templates/windows-chef-client-msi.erb +++ b/lib/chef/knife/bootstrap/templates/windows-chef-client-msi.erb @@ -109,13 +109,13 @@ goto Version10.0 goto chef_installed :chef_installed -@echo Checking for existing chef installation +@echo Checking for existing <%= Chef::Dist::PRODUCT %> installation WHERE <%= Chef::Dist::CLIENT %> >nul 2>nul If !ERRORLEVEL!==0 ( - @echo Existing Chef installation detected, skipping download + @echo Existing <%= Chef::Dist::PRODUCT %> installation detected, skipping download goto key_create ) else ( - @echo No existing installation of chef detected + @echo No existing installation of <%= Chef::Dist::PRODUCT %> detected goto install ) @@ -272,5 +272,5 @@ echo Validation key written. <%= client_d %> <% end -%> -@echo Starting chef to bootstrap the node... +@echo Starting <%= Chef::Dist::CLIENT %> to bootstrap the node... <%= start_chef %> diff --git a/lib/chef/knife/core/windows_bootstrap_context.rb b/lib/chef/knife/core/windows_bootstrap_context.rb index d3f55ce94c..ff67ee3689 100644 --- a/lib/chef/knife/core/windows_bootstrap_context.rb +++ b/lib/chef/knife/core/windows_bootstrap_context.rb @@ -159,7 +159,7 @@ class Chef def start_chef bootstrap_environment_option = bootstrap_environment.nil? ? "" : " -E #{bootstrap_environment}" start_chef = "SET \"PATH=%SystemRoot%\\system32;%SystemRoot%;%SystemRoot%\\System32\\Wbem;%SYSTEMROOT%\\System32\\WindowsPowerShell\\v1.0\\;C:\\ruby\\bin;#{ChefConfig::Config.c_opscode_dir}\\#{ChefConfig::Dist::DIR_SUFFIX}\\bin;#{ChefConfig::Config.c_opscode_dir}\\#{ChefConfig::Dist::DIR_SUFFIX}\\embedded\\bin\;%PATH%\"\n" - start_chef << "chef-client -c #{ChefConfig::Config.etc_chef_dir(true)}/client.rb -j #{ChefConfig::Config.etc_chef_dir(true)}/first-boot.json#{bootstrap_environment_option}\n" + start_chef << "#{Chef::Dist::CLIENT} -c #{ChefConfig::Config.etc_chef_dir(true)}/client.rb -j #{ChefConfig::Config.etc_chef_dir(true)}/first-boot.json#{bootstrap_environment_option}\n" end def win_wget |