diff options
author | Russell Teague <rteague@redhat.com> | 2017-02-09 09:50:27 -0500 |
---|---|---|
committer | Russell Teague <rteague@redhat.com> | 2017-02-14 09:25:45 -0500 |
commit | 1e0ec746a7521c5167975daf293e0b96395c8a56 (patch) | |
tree | 7381c96cba1dbd2dd7a750dfc64b72e277eb0389 /roles/openshift_logging/tasks/label_node.yaml | |
parent | 7127518224d996e01a89db147434e404ebd35296 (diff) | |
download | openshift-1e0ec746a7521c5167975daf293e0b96395c8a56.tar.gz openshift-1e0ec746a7521c5167975daf293e0b96395c8a56.tar.bz2 openshift-1e0ec746a7521c5167975daf293e0b96395c8a56.tar.xz openshift-1e0ec746a7521c5167975daf293e0b96395c8a56.zip |
Modify playbooks to use oc_label module
Diffstat (limited to 'roles/openshift_logging/tasks/label_node.yaml')
-rw-r--r-- | roles/openshift_logging/tasks/label_node.yaml | 52 |
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 |