-
Notifications
You must be signed in to change notification settings - Fork 2
/
playbook.cleanup.yml
55 lines (51 loc) · 1.36 KB
/
playbook.cleanup.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
# code: language=ansible
---
- name: Check firewalld package on prometheus and trento-server hosts
hosts: prometheus-hosts:trento-server
tasks:
- name: Collect package facts
ansible.builtin.package_facts:
manager: auto
- name: Check if a specific package is installed
ansible.builtin.set_fact:
firewalld_installed: "{{ 'firewalld' in ansible_facts.packages }}"
- name: Check the status of firewalld
ansible.builtin.systemd:
name: firewalld.service
register: firewalld_status
- name: Clean up trento components
hosts: trento-server
become: true
tasks:
- name: Trento services
ansible.builtin.include_role:
name: app
tasks_from: cleanup
- name: Proxy
ansible.builtin.include_role:
name: proxy
tasks_from: cleanup
- name: Clean up postgres
hosts: postgres-hosts
become: true
tasks:
- name: Postgres
ansible.builtin.include_role:
name: postgres
tasks_from: cleanup
- name: Clean up rabbitmq
hosts: rabbitmq-hosts
become: true
tasks:
- name: Rabbitmq
ansible.builtin.include_role:
name: rabbitmq
tasks_from: cleanup
- name: Prometheus cleanup
hosts: prometheus-hosts
become: true
tasks:
- name: Prometheus
ansible.builtin.include_role:
name: prometheus
tasks_from: cleanup