summaryrefslogtreecommitdiffstats
path: root/roles/openshift_logging/tasks/label_node.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'roles/openshift_logging/tasks/label_node.yaml')
-rw-r--r--roles/openshift_logging/tasks/label_node.yaml8
1 files changed, 4 insertions, 4 deletions
diff --git a/roles/openshift_logging/tasks/label_node.yaml b/roles/openshift_logging/tasks/label_node.yaml
index 55cfea38c..f35ccc3b6 100644
--- a/roles/openshift_logging/tasks/label_node.yaml
+++ b/roles/openshift_logging/tasks/label_node.yaml
@@ -1,12 +1,12 @@
---
-- shell: >
+- command: >
{{ openshift.common.client_binary }} --config={{ mktemp.stdout }}/admin.kubeconfig get node {{host}}
- --template='{{ '{{index .metadata.labels "' }}{{label}}{{ '"}}' }}'
+ -o jsonpath='{.metadata.labels.{{ label }}}'
register: label_value
failed_when: label_value.rc == 1 and 'exists' not in label_value.stderr
when: not ansible_check_mode
-- shell: >
+- command: >
{{ openshift.common.client_binary }} --config={{ mktemp.stdout }}/admin.kubeconfig label node {{host}} {{label}}={{value}} --overwrite
register: label_result
failed_when: label_result.rc == 1 and 'exists' not in label_result.stderr
@@ -17,7 +17,7 @@
- unlabel is not defined or not unlabel
- not ansible_check_mode
-- shell: >
+- command: >
{{ openshift.common.client_binary }} --config={{ mktemp.stdout }}/admin.kubeconfig label node {{host}} {{label}}-
register: label_result
failed_when: label_result.rc == 1 and 'exists' not in label_result.stderr