-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcleanup.yml
35 lines (33 loc) · 810 Bytes
/
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
- hosts: all
vars:
work_dir: "{{ playbook_dir }}/work"
kubeconfig_dir: "{{ work_dir }}/.kube"
minikube_profiles:
mgmt:
create: no
destroy: yes
cluster1:
create: no
destroy: yes
cluster2:
create: no
destroy: yes
roles:
- role: kameshsampath.minikube
tasks:
- name: "Cleanup work directories"
ansible.builtin.file:
state: absent
path: "{{ item }}"
loop:
- "{{ work_dir }}/.kube"
- "{{ work_dir }}/ssl"
- name: "Cleanup work files"
ansible.builtin.file:
state: absent
path: "{{ item }}"
with_fileglob:
- "{{ work_dir }}/*.yaml"
- "{{ work_dir }}/*.yml"
- "{{ work_dir }}/*.tar.gz"
- "{{ work_dir }}/*.password"