Fix nodes registration in multi-clusters config
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
39c5ef5e82
commit
fa4679acdd
1 changed files with 2 additions and 2 deletions
|
|
@ -203,7 +203,7 @@
|
|||
|
||||
- name: Defined a default lb_kubemaster
|
||||
set_fact:
|
||||
lb_kubemaster: "{{ groups['KubernetesMasters'][0] }}"
|
||||
lb_kubemaster: "{{ groups['KubernetesMasters_' ~ kubernetes_cluster_name][0] }}"
|
||||
when:
|
||||
- lb_kubemaster is undefined
|
||||
# - groups['KubernetesMasters'] | length > 1
|
||||
|
|
@ -219,7 +219,7 @@
|
|||
group: root
|
||||
mode: 0600
|
||||
|
||||
- name: Init Kubernetes on {{ groups['KubernetesMasters'][0] }}
|
||||
- name: Init Kubernetes on {{ groups['KubernetesMasters_' ~ kubernetes_cluster_name][0] }}
|
||||
command: kubeadm init --config=/root/kubeadm-config.yaml
|
||||
|
||||
- name: Add {{ ansible_hostname }} to KubernetesMasterConfigured group
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue