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 vagrant-up+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/30a1a62c-27b4-4ff4-bf1b-af60b22742f7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
HelloPerhaps 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 <florian....@gmail.com> 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 vagrant-up+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/30a1a62c-27b4-4ff4-bf1b-af60b22742f7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--Alvaro
galaxy_command
(template string) - The command pattern used to install Galaxy roles when galaxy_role_file
is set.
The following (optional) placeholders can be used in this command pattern:
%{role_file}
is replaced by the absolute path to the galaxy_role_file
option%{roles_path}
isgalaxy_roles_path
option when such option is defined, orroles
subdirectory sitting in the playbook
parent directory.By default, this option is set to
ansible-galaxy install --role-file=%{role_file} --roles-path=%{roles_path} --force
galaxy_role_file
(string) - The path to the Ansible Galaxy role file.
By default, this option is set to nil
and Galaxy support is then disabled.
Note: if an absolute path is given, the ansible_local
provisioner will assume that it corresponds to the exact location on the guest system.
galaxy_roles_path
(string) - The path to the directory where Ansible Galaxy roles must be installed
By default, this option is set to nil
, which means that the Galaxy roles will be installed in a roles
subdirectory located in the parent directory of the playbook
file.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+unsubscribe@googlegroups.com.
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.
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.
--Alvaro