Jelajahi Sumber

Reference tmpdir from first master hostvars when evacuating nodes.

Andrew Butcher 8 tahun lalu
induk
melakukan
cd38a06539

+ 4 - 4
playbooks/common/openshift-cluster/redeploy-certificates.yml

@@ -201,7 +201,7 @@
   tasks:
   - name: Determine if node is currently scheduleable
     command: >
-      {{ openshift.common.client_binary }} --config={{ mktemp.stdout }}/admin.kubeconfig
+      {{ openshift.common.client_binary }} --config={{ hostvars[groups.oo_first_master.0].mktemp.stdout }}/admin.kubeconfig
       get node {{ openshift.common.hostname | lower }} -o json
     register: node_output
     when: openshift_certificates_redeploy_ca | default(false) | bool
@@ -214,7 +214,7 @@
 
   - name: Prepare for node evacuation
     command: >
-      {{ openshift.common.admin_binary }} --config={{ mktemp.stdout }}/admin.kubeconfig
+      {{ openshift.common.admin_binary }} --config={{ hostvars[groups.oo_first_master.0].mktemp.stdout }}/admin.kubeconfig
       manage-node {{ openshift.common.hostname | lower }}
       --schedulable=false
     delegate_to: "{{ groups.oo_first_master.0 }}"
@@ -222,7 +222,7 @@
 
   - name: Evacuate node
     command: >
-      {{ openshift.common.admin_binary }} --config={{ mktemp.stdout }}/admin.kubeconfig
+      {{ openshift.common.admin_binary }} --config={{ hostvars[groups.oo_first_master.0].mktemp.stdout }}/admin.kubeconfig
       manage-node {{ openshift.common.hostname | lower }}
       --evacuate --force
     delegate_to: "{{ groups.oo_first_master.0 }}"
@@ -230,7 +230,7 @@
 
   - name: Set node schedulability
     command: >
-      {{ openshift.common.admin_binary }} --config={{ mktemp.stdout }}/admin.kubeconfig
+      {{ openshift.common.admin_binary }} --config={{ hostvars[groups.oo_first_master.0].mktemp.stdout }}/admin.kubeconfig
       manage-node {{ openshift.common.hostname | lower }} --schedulable=true
     delegate_to: "{{ groups.oo_first_master.0 }}"
     when: openshift_certificates_redeploy_ca | default(false) | bool and was_schedulable | bool