Przeglądaj źródła

Use nodename when waiting for node to be ready

Vadim Rutkovsky 7 lat temu
rodzic
commit
d754856278

+ 1 - 1
playbooks/openshift-node/private/restart.yml

@@ -49,7 +49,7 @@
     oc_obj:
       state: list
       kind: node
-      name: "{{ openshift.common.hostname | lower }}"
+      name: "{{ openshift.node.nodename | lower }}"
     register: node_output
     delegate_to: "{{ groups.oo_first_master.0 }}"
     when: inventory_hostname in groups.oo_nodes_to_config

+ 2 - 2
roles/openshift_node/tasks/upgrade.yml

@@ -40,7 +40,7 @@
 
 - name: Approve node certificates when bootstrapping
   oc_adm_csr:
-    nodes: "{{ openshift.common.hostname | lower }}"
+    nodes: "{{ openshift.node.nodename | lower }}"
     timeout: 180
     fail_on_timeout: true
   delegate_to: "{{ groups.oo_first_master.0 }}"
@@ -51,7 +51,7 @@
   oc_obj:
     state: list
     kind: node
-    name: "{{ openshift.common.hostname | lower }}"
+    name: "{{ openshift.node.nodename | lower }}"
   register: node_output
   delegate_to: "{{ groups.oo_first_master.0 }}"
   until: node_output.results.returncode == 0 and node_output.results.results[0].status.conditions | selectattr('type', 'match', '^Ready$') | map(attribute='status') | join | bool == True