-
Notifications
You must be signed in to change notification settings - Fork 37
/
teardown.yaml
63 lines (51 loc) · 1.61 KB
/
teardown.yaml
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
---
# will reset the system state to that prior to maas install
- hosts: all
become: true
gather_facts: true
tasks:
- name: "Collect facts about installed packages"
ansible.builtin.package_facts:
manager: auto
strategy: all
- name: "Collect facts about system services"
ansible.builtin.service_facts:
- name: "Remove iptables rules"
ansible.builtin.include_role:
name: maas_firewall
tasks_from: teardown
- name: "Uninstall MAAS region"
ansible.builtin.include_role:
name: "maas_region_controller"
tasks_from: teardown
- name: "Uninstall MAAS rack"
ansible.builtin.include_role:
name: maas_rack_controller
tasks_from: teardown
- name: "Uninstall HAProxy"
ansible.builtin.include_role:
name: maas_proxy
tasks_from: teardown
- name: "Uninstall Pacemaker"
ansible.builtin.include_role:
name: maas_pacemaker
tasks_from: teardown
- name: "Uninstall Corosync"
ansible.builtin.include_role:
name: maas_corosync
tasks_from: teardown
- name: "Uninstall postgres"
ansible.builtin.include_role:
name: maas_postgres
tasks_from: teardown
- name: "Uninstall o11y"
ansible.builtin.include_role:
name: o11y_agent
tasks_from: teardown
when: group_names|intersect(o11y_enabled_roles)
- name: "Remove unused packages from the cache"
ansible.builtin.apt:
autoclean: true
- name: Reload the SystemD to re-read configurations
ansible.builtin.systemd:
daemon-reload: true