ansible_local provisioner tuning example

According to @gildegoma in #9863, here's a concrete example about tuning ansible(_local) provisioner.
This commit is contained in:
Rémy G 2018-05-24 14:22:43 +02:00 committed by GitHub
parent dbba41a7ec
commit 4b896d9945
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 15 additions and 1 deletions

View File

@ -80,6 +80,20 @@ Some of these options are for advanced usage only and should not be used unless
`ansible-galaxy install --role-file=%{role_file} --roles-path=%{roles_path} --force`
Example:
```ruby
Vagrant.configure(2) do |config|
config.vm.box = "centos/7"
config.vm.provision "ansible_local" do |ansible|
ansible.playbook = "/vagrant/playbook.yml"
ansible.galaxy_role_file = "/vagrant/requirements.yml"
ansible.galaxy_role_path = "/etc/ansible/roles"
ansible.galaxy_command = "ansible-galaxy install --force --ignore-certs --role-file=%{role_file} --roles-path=%{roles_path}"
end
end
```
- `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.