Trying to use ansible to configure a windows vagrant box. host is ubuntu ansible 2.8.1 (python3) vagrant 2.2.5 vagrant-libvirt 0.0.45
shell provisioner works (or at least no errors shown), running ConfigureRemotingForAnsible.ps1 from https://github.com/ansible/ansible/blob/devel/examples/scripts/ConfigureRemotingForAnsible.ps1 but the ansible provisioner does not work. it complains about missing winrm even though its installed for both python2 and 3. ansible with winrm does work outside of vagrant. running vagrant up gives me this. Vagrant has automatically selected the compatibility mode '2.0' according to the Ansible version installed (2.7.10). Alternatively, the compatibility mode can be specified in your Vagrantfile: https://www.vagrantup.com/docs/provisioning/ansible_common.html#compatibility_mode default: Running ansible-playbook... PLAY [all] ********************************************************************* TASK [Gathering Facts] ********************************************************* fatal: [default]: FAILED! => {"msg": "winrm or requests is not installed: No module named winrm"} to retry, use: --limit @/home/pixel/vagrant/winping/site.retry PLAY RECAP ********************************************************************* default : ok=0 changed=0 unreachable=0 failed=1 Ansible failed to complete successfully. Any error output should be visible above. Please fix these errors and try again. heres the Vagrantfile, VAGRANTFILE_API_VERSION = "2" Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.vm.box = "peru/windows-server-2012_r2-standard-x64-eval" config.vm.hostname = "pingme" config.vm.network "private_network", ip: "10.17.18.12" config.vm.provision "shell", path: "ConfigureRemotingForAnsible.ps1" config.vm.provision "ansible", playbook: "site.yml" end and heres site.yml - hosts: all vars: ansible_winrm_server_cert_validation: ignore tasks: - name: ping win_ping: -- This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list. GitHub Issues: https://github.com/mitchellh/vagrant/issues IRC: #vagrant on Freenode --- You received this message because you are subscribed to the Google Groups "Vagrant" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/fe0ef122-3fe1-445f-a81f-07c44bb6e246%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
