Skip to content

Commit

Permalink
Fixes #37912 - Correct Puppet server in Windows default user data tem…
Browse files Browse the repository at this point in the history
…plate

It should use the host_puppet_server macro to determine the Puppet
server for a given host, not some unattended URL with a hardcoded token.

Fixes: 6470fc4 ("Fixes #36161 - Add windows default user data template")
  • Loading branch information
ekohl authored and sbernhard committed Oct 16, 2024
1 parent 4825e9e commit 53b8b38
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ identity:
- "<%= powershell %> -Command \"invoke-webrequest -Uri <%= host_param('win_puppet_source') %> -OutFile C:\\puppet-agent-latest.msi\""
- "<%= powershell %> -Command \"md C:\\ProgramData\\PuppetLabs\\puppet\\etc\""
- "<%= powershell %> -Command \"echo \"[main]\" | out-file C:\\ProgramData\\PuppetLabs\\puppet\\etc\\puppet.conf -encoding utf8\""
- "<%= powershell %> -Command \"echo \"server=http://<%= foreman_server_fqdn %>:8000/unattended/built?token=cae2cc74-1394-4acb-ad16-1011020b9bbe\" | add-content C:\\ProgramData\\PuppetLabs\\puppet\\etc\\puppet.conf -encoding utf8\""
- "<%= powershell %> -Command \"echo \"server=<%= host_puppet_server %>\" | add-content C:\\ProgramData\\PuppetLabs\\puppet\\etc\\puppet.conf -encoding utf8\""
- "<%= powershell %> -Command \"echo \"autoflush=true\" | add-content C:\\ProgramData\\PuppetLabs\\puppet\\etc\\puppet.conf -encoding utf8\""
- "<%= powershell %> -Command \"start /wait \"\" msiexec /qn /norestart /i C:\\puppet-agent-latest.msi PUPPET_MASTER_SERVER=<%= @host.puppet_server %>\""
- "<%= powershell %> -Command \"sdelete.exe -accepteula -p 2 C:\\puppet-agent-latest.msi\""
Expand Down

0 comments on commit 53b8b38

Please sign in to comment.