summaryrefslogtreecommitdiff
path: root/lib/chef/knife/bootstrap/templates/windows-chef-client-msi.erb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/knife/bootstrap/templates/windows-chef-client-msi.erb')
-rw-r--r--lib/chef/knife/bootstrap/templates/windows-chef-client-msi.erb18
1 files changed, 9 insertions, 9 deletions
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 c30a22bd94..a85fb9947c 100644
--- a/lib/chef/knife/bootstrap/templates/windows-chef-client-msi.erb
+++ b/lib/chef/knife/bootstrap/templates/windows-chef-client-msi.erb
@@ -21,7 +21,7 @@
@rem the line is read. See help for the /E switch from cmd.exe /? .
@setlocal ENABLEDELAYEDEXPANSION
-<%= "SETX HTTP_PROXY \"#{knife_config[:bootstrap_proxy]}\"" if knife_config[:bootstrap_proxy] %>
+<%= "SETX HTTP_PROXY \"#{config[:bootstrap_proxy]}\"" if config[:bootstrap_proxy] %>
@set BOOTSTRAP_DIRECTORY=<%= bootstrap_directory %>
@echo Checking for existing directory "%BOOTSTRAP_DIRECTORY%"...
@@ -96,10 +96,10 @@ goto architecture_select
goto Version10.0
:architecture_select
-<% if knife_config[:architecture] %>
- @set MACHINE_ARCH=<%= knife_config[:architecture] %>
+<% if config[:architecture] %>
+ @set MACHINE_ARCH=<%= config[:architecture] %>
- <% if knife_config[:architecture] == "x86_64" %>
+ <% if config[:architecture] == "x86_64" %>
IF "%PROCESSOR_ARCHITECTURE%"=="x86" IF not defined PROCESSOR_ARCHITEW6432 (
echo You specified bootstrap_architecture as x86_64 but the target machine is i386. A 64 bit program cannot run on a 32 bit machine. > "&2"
echo Exiting without bootstrapping. > "&2"
@@ -125,8 +125,8 @@ If !ERRORLEVEL!==0 (
:install
@rem If user has provided the custom installation command for chef-client then execute it
-<% if @chef_config[:knife][:bootstrap_install_command] %>
- <%= @chef_config[:knife][:bootstrap_install_command] %>
+<% if config[:bootstrap_install_command] %>
+ <%= config[:bootstrap_install_command] %>
<% else %>
@rem Install Chef using chef-client MSI installer
@@ -232,7 +232,7 @@ echo Writing validation key...
echo Validation key written.
@echo on
-<% if @config[:secret] -%>
+<% if config[:secret] -%>
> <%= bootstrap_directory %>\encrypted_data_bag_secret (
<%= secret %>
)
@@ -244,10 +244,10 @@ mkdir <%= bootstrap_directory %>\trusted_certs
<% end -%>
<%# Generate Ohai Hints -%>
-<% unless @chef_config[:knife][:hints].nil? || @chef_config[:knife][:hints].empty? -%>
+<% unless config[:hints].nil? || config[:hints].empty? -%>
mkdir <%= bootstrap_directory %>\ohai\hints
-<% @chef_config[:knife][:hints].each do |name, hash| -%>
+<% config[:hints].each do |name, hash| -%>
> <%= bootstrap_directory %>\ohai\hints\<%= name %>.json (
<%= escape_and_echo(hash.to_json) %>
)