-
Notifications
You must be signed in to change notification settings - Fork 4
/
site.yml
91 lines (83 loc) · 2.05 KB
/
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
---
- hosts: localhost
gather_facts: "{{ gather_local_facts | default(true) | bool }}"
tasks:
- name: "Check ansible version >=2.8.0"
assert:
msg: "Ansible version 2.8.0 or above is required to run this playbook"
that:
- ansible_version.string is version("2.8.0", ">=")
tags:
- always
- check_version
run_once: yes
ignore_errors: "{{ ignore_assert_errors }}"
- name: install local dependencies
tags:
- local_deps
- always
apt:
name: "{{ packages }}"
state: present
update_cache: yes
vars:
packages: "{{ deb_packages }}"
when:
- ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'
- ansible_distribution_major_version != '20'
- name: install local dependencies
tags:
- local_deps
- always
package:
name: "{{ packages }}"
vars:
packages: "{{ centos_packages['ver' + ansible_distribution_major_version] }}"
when: ansible_distribution == 'CentOS'
- name: install gilt
pip:
name: python-gilt
state: present
executable: pip3
tags:
- local_deps
- always
- name: run gilt overlay
command: "/usr/local/bin/gilt --config {{ gilt_config | default('gilt.yml') }} overlay"
changed_when: false
run_once: yes
tags: always
vars:
ansible_connection: local
centos_packages:
ver7:
- python3-pip
- python-pip
ver8:
- python3-pip
deb_packages:
- python-pip
- hosts: all
gather_facts: true
roles:
- common
- hosts: fullnode
gather_facts: true
become: true
become_method: sudo
any_errors_fatal: true
tasks:
- name: include playbook roles
tags: always
include_role:
name: "{{ roleinputvar }}"
loop: "{{ fullnode_roles }}"
loop_control:
loop_var: roleinputvar
vars:
fullnode_roles:
- docker
- goshimmer
- nginx
- monitoring
- cleanup