-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathsite.yml
39 lines (30 loc) · 893 Bytes
/
site.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# This is the main ansible-playbook
# Run using:
# ansible-playbook site.yml -i environments/vm/inventory
- hosts: all
pre_tasks:
- name: Ansible version
debug: msg="Ansible version {{ ansible_version.full }}"
- name: Verify Ansible meets Drupal VM's version requirements.
assert:
that: "ansible_version.full | version_compare('2.4', '>=')"
msg: >
"Running this playbook requires at least Ansible 2.4"
- name: Configuration for all nodes
hosts: all
become: True
tags: common
gather_facts: no
remote_user: "{{ ansible_remote_user }}"
roles:
- common
# Applies the "example" role to the hosts in the "example" group
- name: Apply role "example" to hosts in group "example"
hosts: example
become: False
tags: example
gather_facts: no
remote_user: "{{ ansible_remote_user }}"
roles:
- example
# - some_other_role