summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorSaravanakumar Arumugam <sarumuga@redhat.com>2018-02-07 21:29:01 +0530
committerSaravanakumar Arumugam <sarumuga@redhat.com>2018-02-07 21:29:01 +0530
commit2861f28c05a10f0b85b019e36e6a61c4a6dbf442 (patch)
tree2580c2f7d3d758c5cfda61d6028e1763628310ca /roles
parent81033d58030f9d1c1207cbfe487e0421c7cdd7be (diff)
downloadopenshift-2861f28c05a10f0b85b019e36e6a61c4a6dbf442.tar.gz
openshift-2861f28c05a10f0b85b019e36e6a61c4a6dbf442.tar.bz2
openshift-2861f28c05a10f0b85b019e36e6a61c4a6dbf442.tar.xz
openshift-2861f28c05a10f0b85b019e36e6a61c4a6dbf442.zip
erase data only if variable is set.
fix block indentatation Signed-off-by: Saravanakumar Arumugam <sarumuga@redhat.com>
Diffstat (limited to 'roles')
-rw-r--r--roles/openshift_storage_glusterfs/tasks/glusterfs_uninstall.yml2
-rw-r--r--roles/openshift_storage_glusterfs/tasks/uninstall.yml18
2 files changed, 12 insertions, 8 deletions
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 <vg>; vgremove -fy <vg>; pvremove -fy <pv>" 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
diff --git a/roles/openshift_storage_glusterfs/tasks/uninstall.yml b/roles/openshift_storage_glusterfs/tasks/uninstall.yml
index 148b8d65d..dcf0c9357 100644
--- a/roles/openshift_storage_glusterfs/tasks/uninstall.yml
+++ b/roles/openshift_storage_glusterfs/tasks/uninstall.yml
@@ -1,10 +1,12 @@
---
-- block:
- - include_tasks: glusterfs_config_facts.yml
- - include_tasks: glusterfs_uninstall.yml
- when: "'glusterfs' in groups and groups['glusterfs'] | length > 0"
+- name: uninstall glusterfs
+ block:
+ - include_tasks: glusterfs_config_facts.yml
+ - include_tasks: glusterfs_uninstall.yml
+ when: "'glusterfs' in groups and groups['glusterfs'] | length > 0"
-- block:
- - include_tasks: glusterfs_registry_facts.yml
- - include_tasks: glusterfs_uninstall.yml
- when: "'glusterfs_registry' in groups and groups['glusterfs_registry'] | length > 0"
+- name: uninstall glusterfs registry
+ block:
+ - include_tasks: glusterfs_registry_facts.yml
+ - include_tasks: glusterfs_uninstall.yml
+ when: "'glusterfs_registry' in groups and groups['glusterfs_registry'] | length > 0"