summaryrefslogtreecommitdiffstats
path: root/roles/openshift_logging/tasks
diff options
context:
space:
mode:
authorJan Wozniak <jwozniak@redhat.com>2017-08-23 15:22:06 +0200
committerJan Wozniak <jwozniak@redhat.com>2017-08-24 15:07:35 +0200
commit51a2d9dbadea02f22168629d44ff339b3c45d6d1 (patch)
treec2d4979d1ee5a0d7ddd29dec9a949f75a2ece786 /roles/openshift_logging/tasks
parent4811a6247a37362e3722a4c18a2053343e7a555b (diff)
downloadopenshift-51a2d9dbadea02f22168629d44ff339b3c45d6d1.tar.gz
openshift-51a2d9dbadea02f22168629d44ff339b3c45d6d1.tar.bz2
openshift-51a2d9dbadea02f22168629d44ff339b3c45d6d1.tar.xz
openshift-51a2d9dbadea02f22168629d44ff339b3c45d6d1.zip
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.
Diffstat (limited to 'roles/openshift_logging/tasks')
-rw-r--r--roles/openshift_logging/tasks/delete_logging.yaml10
1 files changed, 10 insertions, 0 deletions
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: