Browse Source
Changed to use first_kube_control_plane to parse kubeadm_certificate_key (#11875)
Co-authored-by: nvalembois <nvalembois@live.com>
pull/11892/head
Fredrik Liv
1 month ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
3 additions and
3 deletions
-
roles/kubernetes/control-plane/tasks/kubeadm-secondary.yml
|
|
@ -24,11 +24,11 @@ |
|
|
|
|
|
|
|
- name: Parse certificate key if not set |
|
|
|
set_fact: |
|
|
|
kubeadm_certificate_key: "{{ hostvars[groups['kube_control_plane'][0]]['kubeadm_upload_cert'].stdout_lines[-1] | trim }}" |
|
|
|
kubeadm_certificate_key: "{{ hostvars[first_kube_control_plane]['kubeadm_upload_cert'].stdout_lines[-1] | trim }}" |
|
|
|
run_once: true |
|
|
|
when: |
|
|
|
- hostvars[groups['kube_control_plane'][0]]['kubeadm_upload_cert'] is defined |
|
|
|
- hostvars[groups['kube_control_plane'][0]]['kubeadm_upload_cert'] is not skipped |
|
|
|
- hostvars[first_kube_control_plane]['kubeadm_upload_cert'] is defined |
|
|
|
- hostvars[first_kube_control_plane]['kubeadm_upload_cert'] is not skipped |
|
|
|
|
|
|
|
- name: Create kubeadm ControlPlane config |
|
|
|
template: |
|
|
|