Open chanond-w opened 7 years ago
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
"192.168.253.253
"$($c.ThumbPrint)
Should be fixed by #24
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