1234567891011121314151617181920 |
- ---
- - name: stop metrics
- include_tasks: stop_metrics.yaml
- - name: remove metrics components
- command: >
- {{ openshift_client_binary }} -n {{ openshift_metrics_project }} --config={{ mktemp.stdout }}/admin.kubeconfig
- delete --ignore-not-found --selector=metrics-infra
- all,sa,secrets,templates,routes,pvc,rolebindings,clusterrolebindings,clusterrole
- register: delete_metrics
- changed_when: delete_metrics.stdout != 'No resources found'
- - name: remove rolebindings
- command: >
- {{ openshift_client_binary }} -n {{ openshift_metrics_project }} --config={{ mktemp.stdout }}/admin.kubeconfig
- delete --ignore-not-found
- rolebinding/hawkular-view
- clusterrolebinding/heapster-cluster-reader
- clusterrolebinding/hawkular-metrics
- changed_when: delete_metrics.stdout != 'No resources found'
|