diff options
author | Andrew Butcher <abutcher@redhat.com> | 2016-09-08 14:46:27 -0400 |
---|---|---|
committer | Andrew Butcher <abutcher@redhat.com> | 2016-09-08 14:49:29 -0400 |
commit | 70c62ffe21b7b90c23a8a35d4d52c4e23091e421 (patch) | |
tree | 005a95236286e0dd42cdef1a1f2e745fb61686ad /roles/openshift_manage_node | |
parent | 52eeaed447a97a85d0266036136ac611be13bbae (diff) | |
download | openshift-70c62ffe21b7b90c23a8a35d4d52c4e23091e421.tar.gz openshift-70c62ffe21b7b90c23a8a35d4d52c4e23091e421.tar.bz2 openshift-70c62ffe21b7b90c23a8a35d4d52c4e23091e421.tar.xz openshift-70c62ffe21b7b90c23a8a35d4d52c4e23091e421.zip |
Iterate over node inventory hostnames instead of openshift.common.hostname within openshift_manage_node role.
Diffstat (limited to 'roles/openshift_manage_node')
-rw-r--r-- | roles/openshift_manage_node/tasks/main.yml | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/roles/openshift_manage_node/tasks/main.yml b/roles/openshift_manage_node/tasks/main.yml index f999092cc..f45ade751 100644 --- a/roles/openshift_manage_node/tasks/main.yml +++ b/roles/openshift_manage_node/tasks/main.yml @@ -14,7 +14,7 @@ - name: Wait for Node Registration command: > - {{ openshift.common.client_binary }} get node {{ item | lower }} + {{ openshift.common.client_binary }} get node {{ hostvars[item].openshift.common.hostname | lower }} --config={{ openshift_manage_node_kubeconfig }} -n default register: omd_get_node @@ -29,8 +29,7 @@ {{ openshift.common.admin_binary }} manage-node {{ hostvars[item].openshift.common.hostname | lower }} --schedulable={{ 'true' if hostvars[item].openshift.node.schedulable | bool else 'false' }} --config={{ openshift_manage_node_kubeconfig }} -n default - with_items: - - "{{ openshift_nodes }}" + with_items: "{{ openshift_nodes }}" when: hostvars[item].openshift.common.hostname is defined - name: Label nodes @@ -38,8 +37,7 @@ {{ openshift.common.client_binary }} label --overwrite node {{ hostvars[item].openshift.common.hostname | lower }} {{ hostvars[item].openshift.node.labels | oo_combine_dict }} --config={{ openshift_manage_node_kubeconfig }} -n default - with_items: - - "{{ openshift_nodes }}" + with_items: "{{ openshift_nodes }}" when: hostvars[item].openshift.common.hostname is defined and 'labels' in hostvars[item].openshift.node and hostvars[item].openshift.node.labels != {} - name: Delete temp directory |