From 51a2d9dbadea02f22168629d44ff339b3c45d6d1 Mon Sep 17 00:00:00 2001 From: Jan Wozniak Date: Wed, 23 Aug 2017 15:22:06 +0200 Subject: Bug 1467265 - logging: add 'purge' option with uninstall The common uninstall would keep PVC around to prevent unwanted data loss during reinstalls. There is a scenario where the user may want complete removal of EFK stack including PVC. This change adds an optional `openshift_logging_purge_logging` variable to completely remove the EFK stack. By default, this is set to 'False' and only works if user sets `openshift_logging_install_logging` to 'False' to initiate the uninstallation process. --- roles/openshift_logging/tasks/delete_logging.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'roles/openshift_logging/tasks') diff --git a/roles/openshift_logging/tasks/delete_logging.yaml b/roles/openshift_logging/tasks/delete_logging.yaml index 6d023a02d..45298e345 100644 --- a/roles/openshift_logging/tasks/delete_logging.yaml +++ b/roles/openshift_logging/tasks/delete_logging.yaml @@ -14,6 +14,16 @@ - templates - ds +# return all persistent volume claims as well if purge is set +- name: delete logging pvc objects + oc_obj: + state: absent + kind: pvc + namespace: "{{ openshift_logging_namespace }}" + selector: "logging-infra" + when: + - openshift_logging_purge_logging | default(false) | bool + # delete the oauthclient - name: delete oauthclient kibana-proxy oc_obj: -- cgit v1.2.1