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:
parent
dbba41a7ec
commit
4b896d9945
|
@ -80,12 +80,26 @@ 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.
|
||||
|
||||
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.
|
||||
|
|
Loading…
Reference in New Issue