-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathocplabs-ocp-nodes-deinstall.yaml
More file actions
46 lines (46 loc) · 1.39 KB
/
ocplabs-ocp-nodes-deinstall.yaml
File metadata and controls
46 lines (46 loc) · 1.39 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
- hosts: etcd
tasks:
- name: stop_etcd | Stop etcd Service
systemd:
name: etcd_container.service
enabled: false
daemon_reload: yes
state: stopped
ignore_errors: yes
- name: clean_etcd | Remove /var/lib/etcd
file:
path: /var/lib/etcd
state: absent
- hosts: masters:nodes
tasks:
- name: stop_cockpit | Stop Cockpit Service
systemd:
name: cockpitws.service
enabled: false
daemon_reload: yes
state: stopped
- name: kill_containers | Kill remaining containers
shell: docker ps -q | awk '{print $1}' | xargs -I{} docker kill {}
- name: remove_containers | Remove remaining containers
shell: docker ps -q -a | awk '{print $1}' | xargs -I{} docker rm -f -v {}
- name: clean_registry | Remove Docker images from registry
shell: docker images -q | awk '{print $1}' | sort -u | xargs -I{} docker rmi {} -f
- name: clean_device | Remove Docker volume group
lvg:
pvs: /dev/sda4
vg: docker-vg
state: absent
force: yes
- name: clean_device | Delete Docker partition
parted:
device: /dev/sda
number: 4
state: absent
- name: clean_etc_origin | Remove /etc/origin
file:
path: /etc/origin
state: absent
- name: clean_dockers_certs | Remove additional docker certs
file:
path: /etc/docker/certs.d/docker-registry.default.svc:5000
state: absent