Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vagrant box is not connectable out-of-the-box #86

Open
chanond-w opened this issue May 23, 2017 · 1 comment
Open

vagrant box is not connectable out-of-the-box #86

chanond-w opened this issue May 23, 2017 · 1 comment

Comments

@chanond-w
Copy link

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

@chanond-w
Copy link
Author

Should be fixed by #24

@chanond-w chanond-w changed the title vagrant box is not runable out-of-the-box vagrant box is not connectable out-of-the-box May 23, 2017
jean added a commit to jean/packer-templates that referenced this issue Jun 14, 2017
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant