forked from openstack-k8s-operators/ci-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
/
reproducer-clean.yml
89 lines (79 loc) · 2.15 KB
/
reproducer-clean.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
- name: Clean reproducer layout
hosts: "{{ cifmw_target_host | default('localhost') }}"
gather_facts: true
tasks:
- name: Call reproducer.cleanup
tags:
- deepscrub
ansible.builtin.import_role:
name: reproducer
tasks_from: cleanup.yml
- name: Clean up devscripts related content
tags:
- never
- deepscrub
ansible.builtin.import_role:
name: devscripts
tasks_from: cleanup.yml
- name: Clean up CRC related content
tags:
- never
- deepscrub
ansible.builtin.import_role:
name: rhol_crc
tasks_from: cleanup.yml
- name: Clean up nat64 appliance
tags:
- never
- deepscrub
ansible.builtin.import_role:
name: nat64_appliance
tasks_from: cleanup.yml
- name: Cleanup config_drive data
tags:
- deepscrub
ansible.builtin.import_role:
name: config_drive
tasks_from: cleanup.yml
- name: Remove remote selected data
tags:
- deepscrub
ansible.builtin.file:
path: "{{ cifmw_reproducer_basedir }}/{{ item }}"
state: absent
loop:
- reproducer-inventory
- reproducer-network-env
- artifacts/run-id
- name: Ensure sushy_driver key is removed
tags:
- deepscrub
ansible.builtin.lineinfile:
path: "{{ ansible_user_dir }}/.ssh/authorized_keys"
state: absent
regexp: ".*cifmw-sushy_emulator$"
- name: Remove /etc/ci/ directory
tags:
- deepscrub
become: true
ansible.builtin.file:
path: /etc/ci/
state: absent
- name: Remove local ci-reproducer data directory
tags:
- deepscrub
delegate_to: localhost
ansible.builtin.file:
path: "{{ lookup('env', 'HOME') }}/ci-framework-data/ci-reproducer"
state: absent
- name: Remove basedir
tags:
- never
- deepscrub
ansible.builtin.file:
path: "{{ cifmw_reproducer_basedir }}"
state: absent
- name: Clear all facts
tags:
- deepscrub
ansible.builtin.meta: clear_facts