forked from xialingxiao/andokaelk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
clean.yaml
70 lines (65 loc) · 1.55 KB
/
clean.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
64
65
66
67
68
69
70
---
- name: setup
hosts: all
vars_files:
- vars/common_vars
- vars/common_vault
- vars/vars
- vars/vault
vars:
- project_stage_dir: "{{ stage_dir }}/{{ project_id }}/{{ inventory_hostname }}"
tasks:
- name: setup
debug: msg="gathered info from host"
- name: clean up
hosts: nodes
vars_files:
- vars/common_vars
- vars/common_vault
- vars/vars
- vars/vault
vars:
- project_stage_dir: "{{ stage_dir }}/{{ project_id }}/{{ inventory_hostname }}"
tasks:
- name: remove project staging directory
file: path={{ project_stage_dir }} state=absent
become: true
become_user: root
- name: clean up
hosts: gateway
vars_files:
- vars/common_vars
- vars/common_vault
- vars/vars
- vars/vault
vars:
- project_stage_dir: "{{ stage_dir }}/{{ project_id }}/{{ inventory_hostname }}"
tasks:
- name: remove project staging directory
file: path={{ project_stage_dir }} state=absent
become: true
become_user: root
- name: clean up
hosts: nodes
vars_files:
- vars/common_vars
- vars/common_vault
- vars/vars
- vars/vault
tasks:
- name: remove project staging directory
file: path={{ stage_dir }}/{{ project_id }} state=absent
become: true
become_user: root
- name: clean up
hosts: gateway
vars_files:
- vars/common_vars
- vars/common_vault
- vars/vars
- vars/vault
tasks:
- name: remove project staging directory
file: path={{ stage_dir }}/{{ project_id }} state=absent
become: true
become_user: root