This was it... some time ago I had already added the galaxy_role_file 
setting to our Vagrantfile, but it didn't work at that time so I commented 
it out again. Most likely because we had an outdated version of Vagrant 
installed. However, when I now tried to improve our Vagrant configuration 
again, I must have assumed that this option didn't actually exist and that 
it had only been an experiment of mine, because it is not mentioned in the 
docs about ansible_local... I didn't notice the link to the common 
options...

After an update of Vagrant, everything works as expected now!

in Chef, when people want to use chef server, same for puppet of any 
> service like spacewalk for authenticated os updated, a bootstraping is 
> required.
>
> Did you try the galaxy commands available? it seems per the documentation 
> that will run before the actual playbook:
>
> example i found
>
>
>
> https://github.com/silpion/ansible-tomcat/blob/master/Vagrantfile#L51-L54
>
>
>
>
> documentation
>
>
>    - 
>    
>    galaxy_command 
>    
> <https://www.vagrantup.com/docs/provisioning/ansible_common.html#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} 
>       
> <https://www.vagrantup.com/docs/provisioning/ansible_common.html#role_file-> 
> is 
>       replaced by the absolute path to the galaxy_role_file option
>       - %{roles_path} 
>       
> <https://www.vagrantup.com/docs/provisioning/ansible_common.html#roles_path->
>        is
>          - replaced by the absolute path to the galaxy_roles_path option 
>          when such option is defined, or
>          - replaced by the absolute path to a roles 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 
>    
> <https://www.vagrantup.com/docs/provisioning/ansible_common.html#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 
>    
> <https://www.vagrantup.com/docs/provisioning/ansible_common.html#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.
>    
>
> On Wed, Apr 26, 2017 at 4:52 PM, WowSuchMagic <[email protected] 
> <javascript:>> wrote:
>
>> 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]> 
>>> 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].
>>>> 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] <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/vagrant-up/ae9e41de-7db8-4fdf-82a0-96d7db8e2d3f%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/vagrant-up/ae9e41de-7db8-4fdf-82a0-96d7db8e2d3f%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/f3a5fbd7-4f9e-4d78-8f43-1451519785a5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to