summaryrefslogtreecommitdiffstats
path: root/roles/openshift_logging/tasks/stop_cluster.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'roles/openshift_logging/tasks/stop_cluster.yaml')
-rw-r--r--roles/openshift_logging/tasks/stop_cluster.yaml7
1 files changed, 5 insertions, 2 deletions
diff --git a/roles/openshift_logging/tasks/stop_cluster.yaml b/roles/openshift_logging/tasks/stop_cluster.yaml
index e44493e4d..c8e8fbd2c 100644
--- a/roles/openshift_logging/tasks/stop_cluster.yaml
+++ b/roles/openshift_logging/tasks/stop_cluster.yaml
@@ -1,17 +1,20 @@
---
- command: >
- {{openshift.common.client_binary}} --config={{mktemp.stdout}}/admin.kubeconfig get node -o jsonpath='{.items[*].metadata.name}'
+ {{openshift.common.client_binary}} --config={{mktemp.stdout}}/admin.kubeconfig get node -o name
register: fluentd_hosts
when: "'--all' in openshift_logging_fluentd_hosts"
changed_when: no
+- set_fact: openshift_logging_fluentd_hosts={{ fluentd_hosts.stdout_lines | regex_replace('node/', '') }}
+ when: "'--all' in openshift_logging_fluentd_hosts"
+
- name: stop fluentd
include: label_node.yaml
vars:
host: "{{fluentd_host}}"
label: "{{openshift_logging_fluentd_nodeselector.keys()[0]}}"
unlabel: True
- with_items: "{{(fluentd_hosts.stdout_lines is defined) | ternary(fluentd_hosts.stdout_lines, openshift_logging_fluentd_hosts)}}"
+ with_items: "{{ openshift_logging_fluentd_hosts }}"
loop_control:
loop_var: fluentd_host