From 81033d58030f9d1c1207cbfe487e0421c7cdd7be Mon Sep 17 00:00:00 2001 From: Saravanakumar Arumugam Date: Wed, 7 Feb 2018 14:52:46 +0530 Subject: uninstall playbook for GlusterFS Signed-off-by: Saravanakumar Arumugam --- roles/openshift_storage_glusterfs/tasks/uninstall.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 roles/openshift_storage_glusterfs/tasks/uninstall.yml (limited to 'roles/openshift_storage_glusterfs/tasks/uninstall.yml') diff --git a/roles/openshift_storage_glusterfs/tasks/uninstall.yml b/roles/openshift_storage_glusterfs/tasks/uninstall.yml new file mode 100644 index 000000000..148b8d65d --- /dev/null +++ b/roles/openshift_storage_glusterfs/tasks/uninstall.yml @@ -0,0 +1,10 @@ +--- +- 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" -- cgit v1.2.1 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/uninstall.yml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'roles/openshift_storage_glusterfs/tasks/uninstall.yml') 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" -- cgit v1.2.1