Skip to content
This repository was archived by the owner on Feb 13, 2023. It is now read-only.

Commit 42afb3c

Browse files
committed
Merge pull request #688 from oxyc/local-playbook
Issue #666: Add docs on how to run custom playbooks
2 parents 1dfc78d + 8d7104d commit 42afb3c

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

docs/extras/scripts.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,19 @@ The path will be evaluated as a [glob pattern](https://docs.python.org/2/library
3333
The files matched will run in alphabetical order, and as with shell scripts, pre-provision task files will run before any other packages are installed.
3434

3535
_Note: Unlike pre- and post-provision scripts, extra task files will be relative to `provisioning/files/` instead of `provisioning/`._
36+
37+
38+
## Ansible playbooks
39+
40+
Out of the box Drupal VM does not support running additional playbooks or adding your own roles but using [`Vagrantfile.local`](../other/overriding-configurations.md#extending-the-vagrantfile-with-vagrantfilelocal) you can add any number of additional provisioners to vagrant.
41+
42+
As an example you might have a `local.playbook.yml` with it's own dependencies defined in `local.requirements.yml`. Place both of these next to your `config.yml` and add the following `Vagrantfile.local`.
43+
44+
```rb
45+
config.vm.provision 'ansible' do |ansible|
46+
ansible.playbook = "#{host_config_dir}/local.playbook.yml"
47+
ansible.galaxy_role_file = "#{host_config_dir}/local.requirements.yml"
48+
end
49+
```
50+
51+
When you run `vagrant provision` this playbook will run after Drupal VM's own playbook.

0 commit comments

Comments
 (0)