summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
Diffstat (limited to 'roles')
-rw-r--r--roles/openshift_logging/tasks/delete_logging.yaml21
-rw-r--r--roles/openshift_logging/tasks/label_node.yaml1
2 files changed, 22 insertions, 0 deletions
diff --git a/roles/openshift_logging/tasks/delete_logging.yaml b/roles/openshift_logging/tasks/delete_logging.yaml
index 6e8fc29d0..908f3ee88 100644
--- a/roles/openshift_logging/tasks/delete_logging.yaml
+++ b/roles/openshift_logging/tasks/delete_logging.yaml
@@ -14,17 +14,24 @@
- routes
- templates
- daemonset
+ register: delete_result
+ changed_when: delete_result.stdout.find("deleted") != -1 and delete_result.rc == 0
+
# delete the oauthclient
- name: delete oauthclient kibana-proxy
command: >
{{ openshift.common.client_binary }} --config={{ mktemp.stdout }}/admin.kubeconfig delete oauthclient kibana-proxy --ignore-not-found=true
+ register: delete_result
+ changed_when: delete_result.stdout.find("deleted") != -1 and delete_result.rc == 0
# delete any image streams that we may have created
- name: delete logging is
command: >
{{ openshift.common.client_binary }} --config={{ mktemp.stdout }}/admin.kubeconfig
delete is -l logging-infra=support -n {{ openshift_logging_namespace }} --ignore-not-found=true
+ register: delete_result
+ changed_when: delete_result.stdout.find("deleted") != -1 and delete_result.rc == 0
# delete our old secrets
- name: delete logging secrets
@@ -38,6 +45,8 @@
- logging-kibana-proxy
- logging-curator
ignore_errors: yes
+ register: delete_result
+ changed_when: delete_result.stdout.find("deleted") != -1 and delete_result.rc == 0
# delete role bindings
- name: delete rolebindings
@@ -46,6 +55,8 @@
delete rolebinding {{ item }} -n {{ openshift_logging_namespace }} --ignore-not-found=true
with_items:
- logging-elasticsearch-view-role
+ register: delete_result
+ changed_when: delete_result.stdout.find("deleted") != -1 and delete_result.rc == 0
# delete cluster role bindings
- name: delete cluster role bindings
@@ -54,6 +65,8 @@
delete clusterrolebindings {{ item }} -n {{ openshift_logging_namespace }} --ignore-not-found=true
with_items:
- rolebinding-reader
+ register: delete_result
+ changed_when: delete_result.stdout.find("deleted") != -1 and delete_result.rc == 0
# delete cluster roles
- name: delete cluster roles
@@ -62,6 +75,8 @@
delete clusterroles {{ item }} -n {{ openshift_logging_namespace }} --ignore-not-found=true
with_items:
- rolebinding-reader
+ register: delete_result
+ changed_when: delete_result.stdout.find("deleted") != -1 and delete_result.rc == 0
# delete our service accounts
- name: delete service accounts
@@ -73,6 +88,8 @@
- aggregated-logging-kibana
- aggregated-logging-curator
- aggregated-logging-fluentd
+ register: delete_result
+ changed_when: delete_result.stdout.find("deleted") != -1 and delete_result.rc == 0
# delete our roles
- name: delete roles
@@ -81,6 +98,8 @@
delete clusterrole {{ item }} -n {{ openshift_logging_namespace }} --ignore-not-found=true
with_items:
- daemonset-admin
+ register: delete_result
+ changed_when: delete_result.stdout.find("deleted") != -1 and delete_result.rc == 0
# delete our configmaps
- name: delete configmaps
@@ -91,3 +110,5 @@
- logging-curator
- logging-elasticsearch
- logging-fluentd
+ register: delete_result
+ changed_when: delete_result.stdout.find("deleted") != -1 and delete_result.rc == 0
diff --git a/roles/openshift_logging/tasks/label_node.yaml b/roles/openshift_logging/tasks/label_node.yaml
index 6a97fece2..aecb5d81b 100644
--- a/roles/openshift_logging/tasks/label_node.yaml
+++ b/roles/openshift_logging/tasks/label_node.yaml
@@ -26,3 +26,4 @@
- unlabel is defined
- unlabel
- not ansible_check_mode
+ - label_value.stdout != ""