-
-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathglances.yml
More file actions
59 lines (48 loc) · 1.76 KB
/
Copy pathglances.yml
File metadata and controls
59 lines (48 loc) · 1.76 KB
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
- name: 'Playbook linuxfabrik.lfops.glances'
hosts:
- 'lfops_glances'
pre_tasks:
- ansible.builtin.import_role:
name: 'shared'
tasks_from: 'log-start.yml'
tags:
- 'always'
- ansible.builtin.import_role:
name: 'shared'
tasks_from: 'global-variables.yml'
tags:
- 'always'
roles:
- role: 'linuxfabrik.lfops.repo_baseos'
repo_baseos__crb_repo_enabled__dependent_var: '{{
repo_epel__repo_baseos__crb_repo_enabled__dependent_var
}}'
# CRB is shipped in the Rocky default repo file (Rocky 9+, formerly from EPEL), so enable it there only.
when:
- 'ansible_facts["distribution"] == "Rocky" and ansible_facts["distribution_major_version"] | int >= 9'
- 'not glances__skip_repo_baseos | d(false)'
- role: 'linuxfabrik.lfops.repo_epel'
when:
- 'ansible_facts["os_family"] == "RedHat" and ansible_facts["distribution"] != "Fedora"'
- 'not glances__skip_repo_epel | d(false)'
# On RHEL 10 and clones glances is not in EPEL 10, so install it into a Python venv. The
# dependent_var is empty on every other platform, so the role is skipped there.
- role: 'linuxfabrik.lfops.python_venv'
python_venv__venvs__dependent_var: '{{
glances__python_venv__venvs__dependent_var
}}'
when:
- 'glances__python_venv__venvs__dependent_var | length > 0'
- 'not glances__skip_python_venv | d(false)'
- role: 'linuxfabrik.lfops.glances'
post_tasks:
- ansible.builtin.import_role:
name: 'shared'
tasks_from: 'log-end.yml'
tags:
- 'always'
- ansible.builtin.import_role:
name: 'shared'
tasks_from: 'print-messages.yml'
tags:
- 'always'