When running ansible playbook in windows vagrant image, output looks like:
==> default: Machine booted and ready!
Sorry, don't know how to check guest version of Virtualbox Guest Additions on this platform. Stopping installation.
==> default: Checking for guest additions in VM...
default: The guest additions on this VM do not match the installed version of
default: VirtualBox! In most cases this is fine, but in rare cases it can
default: prevent things such as shared folders from working properly. If you see
default: shared folder errors, please make sure the guest additions within the
default: virtual machine match the version of VirtualBox you have installed on
default: your host and reload your VM.
default:
default: Guest Additions Version: 5.1.12
default: VirtualBox Version: 5.2
==> default: Mounting shared folders...
default: /vagrant => /Users/aaron.west/Workspace/hss-iaas/ansible-repo/tmp
==> default: Running provisioner: ansible_local...
`playbook` does not exist on the guest: /vagrant/test/local.yml
The playbook can be found here: https://galaxy.ansible.com/lean_delivery/java
and the vagrant windows server 2016 image that i'm using is: mwrock/Windows2016
the playbook looks like:
- hosts: local
gather_facts: yes
connection: local
become: yes
become_user: root
roles:
- ../roles/java
As per the ansible_local documentation:
The Ansible Local provisioner requires that all the Ansible Playbook files are available on the guest machine, at the location referred by the provisioning_path option. Usually these files are initially present on the host machine (as part of your Vagrant project), and it is quite easy to share them with a Vagrant Synced Folder.
To do so, add the following:
config.vm.synced_folder ".", "/vagrant"
This configuration shares the vagrant folder from the host in the "/vagrant" folder on the guest, where it seems to look for the playbook as can be seen in the error message you get.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With