You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was following this post without using chef (I was using VirtualBox) and it seems like it was not as straight forward as you have posted. I had to add more powershell script steps to make it connectable with ansible by using the following script
Without this, Ansible can't connect to the created VM.
This is a fix to mwrock#86
A better fix is probably
mwrock#24 which modifies the
box creation, rather than adding provisioning after the fact, but that
has gone unmerged since 2015.
I was following this post without using chef (I was using VirtualBox) and it seems like it was not as straight forward as you have posted. I had to add more powershell script steps to make it connectable with ansible by using the following script
netsh advfirewall firewall add rule name="WinRM-HTTP" dir=in localport=5985 protocol=TCP action=allow
netsh advfirewall firewall add rule name="WinRM-HTTPS" dir=in localport=5986 protocol=TCP action=allow
$c = New-SelfSignedCertificate -DnsName "192.168.253.253" -CertStoreLocation cert:\LocalMachine\My
winrm create winrm/config/Listener?Address=*+Transport=HTTPS "@{Hostname=
"192.168.253.253
";CertificateThumbprint="$($c.ThumbPrint)
"}"netsh advfirewall firewall add rule name="WinRM-HTTPS" dir=in localport=5986 protocol=TCP action=allow
iwr https://raw.githubusercontent.com/ansible/ansible/devel/examples/scripts/ConfigureRemotingForAnsible.ps1 -UseBasicParsing | iex
The text was updated successfully, but these errors were encountered: