Skip to content

Commit d95bb04

Browse files
committed
Remove devscript content only when deepscrub is used
We don't need to remove each time the all content necessary to deploy devscript on cleanup. The devscript is using config_$(whoami).sh config file to get necessary information how to deploy the cluster. Let's assume that after executing: "make clean" from dev-scripts [1] project, all the OCP cluster would be removed, and on next execution "make all", the script will be base on config file. [1] https://github.com/openshift-metal3/dev-scripts/ Signed-off-by: Daniel Pawlik <[email protected]>
1 parent e97a352 commit d95bb04

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

roles/devscripts/tasks/cleanup.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@
1515
# under the License.
1616

1717
- name: Scrub the existence of dev-scripts deployed OCP cluster.
18-
tags:
19-
- never
20-
- deepscrub
2118
when: >-
2219
(cifmw_devscripts_ocp_comply is undefined) or
2320
(not cifmw_devscripts_ocp_comply) or
@@ -53,6 +50,9 @@
5350
poll: 10
5451

5552
- name: Remove the SSH key generated for accessing the platform
53+
tags:
54+
- never
55+
- deepscrub
5656
ansible.builtin.file:
5757
path: "{{ cifmw_devscripts_artifacts_dir }}/{{ item }}"
5858
state: absent
@@ -61,13 +61,19 @@
6161
- "cifmw_ocp_access_key.pub"
6262

6363
- name: Cleanup the devscripts repo directory.
64+
tags:
65+
- never
66+
- deepscrub
6467
become: true
6568
ansible.builtin.file:
6669
path: "{{ cifmw_devscripts_repo_dir }}"
6770
state: absent
6871
force: true
6972

7073
- name: Cleanup the devscripts working directory.
74+
tags:
75+
- never
76+
- deepscrub
7177
become: true
7278
ansible.builtin.file:
7379
path: "{{ cifmw_devscripts_config.working_dir }}"
@@ -80,6 +86,9 @@
8086
tasks_from: cleanup-dns.yml
8187

8288
- name: Ensure no dangling qcow2 images
89+
tags:
90+
- never
91+
- deepscrub
8392
block:
8493
- name: Get files
8594
register: _found_imgs

0 commit comments

Comments
 (0)