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.yaml52
1 files changed, 0 insertions, 52 deletions
diff --git a/roles/openshift_logging/tasks/label_node.yaml b/roles/openshift_logging/tasks/label_node.yaml
deleted file mode 100644
index ebe8f1ca8..000000000
--- a/roles/openshift_logging/tasks/label_node.yaml
+++ /dev/null
@@ -1,52 +0,0 @@
----
-- command: >
- {{ openshift.common.client_binary }} --config={{ mktemp.stdout }}/admin.kubeconfig get node {{host}}
- -o jsonpath='{.metadata.labels}'
- register: node_labels
- when: not ansible_check_mode
- changed_when: no
-
-- command: >
- {{ openshift.common.client_binary }} --config={{ mktemp.stdout }}/admin.kubeconfig label node {{host}} {{label}}={{value}}
- register: label_result
- failed_when: label_result.rc == 1 and 'exists' not in label_result.stderr
- when:
- - value is defined
- - node_labels.stdout is defined
- - label not in node_labels.stdout
- - unlabel is not defined or not unlabel
- - not ansible_check_mode
-
-- command: >
- {{ openshift.common.client_binary }} --config={{ mktemp.stdout }}/admin.kubeconfig get node {{host}}
- -o jsonpath='{.metadata.labels.{{ label }}}'
- register: label_value
- ignore_errors: yes
- changed_when: no
- when:
- - value is defined
- - node_labels.stdout is defined
- - label in node_labels.stdout
- - unlabel is not defined or not unlabel
- - not ansible_check_mode
-
-- 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
- when:
- - value is defined
- - label_value.stdout is defined
- - label_value.stdout != value
- - unlabel is not defined or not unlabel
- - not ansible_check_mode
-
-- 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
- when:
- - unlabel is defined
- - unlabel
- - not ansible_check_mode
- - label in node_labels.stdout