From 2861f28c05a10f0b85b019e36e6a61c4a6dbf442 Mon Sep 17 00:00:00 2001 From: Saravanakumar Arumugam Date: Wed, 7 Feb 2018 21:29:01 +0530 Subject: erase data only if variable is set. fix block indentatation Signed-off-by: Saravanakumar Arumugam --- roles/openshift_storage_glusterfs/tasks/glusterfs_uninstall.yml | 2 ++ 1 file changed, 2 insertions(+) (limited to 'roles/openshift_storage_glusterfs/tasks/glusterfs_uninstall.yml') diff --git a/roles/openshift_storage_glusterfs/tasks/glusterfs_uninstall.yml b/roles/openshift_storage_glusterfs/tasks/glusterfs_uninstall.yml index 2d8ca676b..a5774cc75 100644 --- a/roles/openshift_storage_glusterfs/tasks/glusterfs_uninstall.yml +++ b/roles/openshift_storage_glusterfs/tasks/glusterfs_uninstall.yml @@ -99,6 +99,7 @@ delegate_to: "{{ item }}" with_items: "{{ glusterfs_nodes | default([]) }}" failed_when: False + when: glusterfs_wipe # Runs "lvremove -ff ; vgremove -fy ; pvremove -fy " for every device found to be a physical volume. - name: Clear GlusterFS storage device contents @@ -111,4 +112,5 @@ delay: 1 retries: 30 when: + - glusterfs_wipe - item.stdout_lines | count > 0 -- cgit v1.2.1