That is pretty much how we used to do it before the Ansible Local provider became available. We used a shell script which first installed the ansible-galaxy roles and then ran the Ansible playbook. We just thought that upgrading to the Ansible Local provider would clean up our provisioning scripts.
So am I right that there is no built-in functionality for running ansible-galaxy before running the playbook? Seems like a pretty essential feature is missing... Hello > > Perhaps you can avoid the vagrant ansible run, and use just an script that > run ansible local ? > > Alvaro > > On Wed, Apr 26, 2017 at 2:55 PM, WowSuchMagic <[email protected] > <javascript:>> wrote: > >> We are using the Ansible Local provisioner to install the required >> software on our development Vagrant box. However, we want to use third >> party roles. The easiest solution to install those roles is using an >> ansible-galaxy requirements file: >> http://docs.ansible.com/ansible/galaxy.html#installing-multiple-roles-from-a-file >> >> How can we execute ansible-galaxy before the playbook is run by Ansible >> Local? Is there a feature for this already that I have missed? You can't >> run ansible-galaxy as a task inside the playbook, because apparently the >> roles that a playbook requires are checked before its execution and if a >> role is not available the playbook is not run at all. >> >> -- >> 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] <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/vagrant-up/30a1a62c-27b4-4ff4-bf1b-af60b22742f7%40googlegroups.com >> >> <https://groups.google.com/d/msgid/vagrant-up/30a1a62c-27b4-4ff4-bf1b-af60b22742f7%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > Alvaro > > -- 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/ae9e41de-7db8-4fdf-82a0-96d7db8e2d3f%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
