forked from sympa-community/sympa-ansible
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsite.yml
34 lines (29 loc) · 795 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
# This is the main ansible-playbook
# Run using:
# ansible-playbook site.yml -i environments/vm/inventory
## Ansible version requirements:
## 2.2 : provide include_role plugin
- name: Check Ansible version
hosts: all
remote_user: "{{ ansible_remote_user }}"
tags: check_ansible
tasks:
- name: Check Ansible version
assert:
that: "ansible_version.full | version_compare('2.5.0', '>=')"
msg: "This playbook requires Ansible 2.5.0 or greater."
- name: Configuration for all nodes
hosts: all
become: yes
tags: common
remote_user: "{{ ansible_remote_user }}"
roles:
- common
- name: Apply role "sympa" to hosts in group "sympa"
hosts: sympa
become: yes
tags: sympa
remote_user: "{{ ansible_remote_user }}"
roles:
- sympa
- sympa-test