From de5c01fffd9215d5f2baff63baa2ccc8fa47c812 Mon Sep 17 00:00:00 2001 From: mwringe Date: Tue, 13 Jun 2017 21:54:50 -0400 Subject: Support installing HOSA via ansible --- roles/openshift_metrics/tasks/uninstall_hosa.yaml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 roles/openshift_metrics/tasks/uninstall_hosa.yaml (limited to 'roles/openshift_metrics/tasks/uninstall_hosa.yaml') diff --git a/roles/openshift_metrics/tasks/uninstall_hosa.yaml b/roles/openshift_metrics/tasks/uninstall_hosa.yaml new file mode 100644 index 000000000..42ed02460 --- /dev/null +++ b/roles/openshift_metrics/tasks/uninstall_hosa.yaml @@ -0,0 +1,15 @@ +--- +- name: remove Hawkular Agent (HOSA) components + command: > + {{ openshift.common.client_binary }} -n {{ openshift_metrics_hawkular_agent_namespace }} --config={{ mktemp.stdout }}/admin.kubeconfig + delete --ignore-not-found --selector=metrics-infra=agent + all,sa,secrets,templates,routes,pvc,rolebindings,clusterrolebindings + register: delete_metrics + changed_when: delete_metrics.stdout != 'No resources found' + +- name: remove rolebindings + command: > + {{ openshift.common.client_binary }} -n {{ openshift_metrics_hawkular_agent_namespace }} --config={{ mktemp.stdout }}/admin.kubeconfig + delete --ignore-not-found + clusterrolebinding/hawkular-openshift-agent-rb + changed_when: delete_metrics.stdout != 'No resources found' -- cgit v1.2.3