bootstrap windows 2016 ami, puppet 6

17 views
Skip to first unread message

Deo Breathnu

unread,
Apr 26, 2019, 3:52:53 PM4/26/19
to Puppet Users
I have tried to boot strap a windows 2016 ec2 instance through a launch template. In the config I put

<powershell>
[Net.ServicePointManager]::ServerCertificateValidationCallback = {$true}; $webClient = New-Object System.Net.WebClient; $webClient.DownloadFile('https://<MASTER HOSTNAME>:8140/packages/current/install.ps1', 'install.ps1'); .\install.ps1
</powershell>

I of course put my puppetmaster hostname in. I have used this with method of installing the agent with running ec2 servers, but I am failing here.

I am looking for idea's as to bootstrapping a windows 2016 ec2 instance with puppet 6.

Any idea's?




KevinR

unread,
Apr 29, 2019, 6:28:46 AM4/29/19
to Puppet Users
It could be either the Powershell ExecutionPolicy, or simply a failure to resolve the hostname of your Puppet server. Or it could be an SSL problem, if the hostname you're using for the Master doesn't appear in the list of Subject Alternative Names in the SSL cert on the master.

Try this user_data to see if it works better:

<powershell>
$hosts = "$env:windir\System32\drivers\etc\hosts"
"<MASTER IP> <MASTER HOSTNAME>" | Add-Content -PassThru $hosts;
Set-ExecutionPolicy Bypass -Scope Process -Force;
[Net.ServicePointManager]::ServerCertificateValidationCallback = {$true}; 
$webClient = New-Object System.Net.WebClient; 
$webClient.DownloadFile('https://<MASTER HOSTNAME>:8140/packages/current/install.ps1', 'install.ps1'); 
.\install.ps1;
</powershell>

- Kevin Reeuwijk
Sr Sales Engineer
Puppet

Deo Breathnu

unread,
May 4, 2019, 5:08:58 PM5/4/19
to Puppet Users
Thanks for replying, and it worked. 
Reply all
Reply to author
Forward
0 new messages