parent
4ac2e4712c
commit
637be8b2b2
@ -1,2 +1,3 @@ |
||||
k3s_master_token: SOME_SECRET |
||||
k3s_bootstrap: false |
||||
k3s_master_address: "{{ hostvars[groups['linux_k3s_master'][0]]['ipv4_address'] }}" |
||||
|
||||
@ -1,4 +1,4 @@ |
||||
- name: run cluster init on first node |
||||
shell: "curl -sfL https://get.k3s.io | K3S_TOKEN={{ k3s_secret }} sh -s - server --cluster-init" |
||||
shell: "curl -sfL https://get.k3s.io | K3S_TOKEN={{ k3s_master_secret }} sh -s - server --cluster-init" |
||||
become: yes |
||||
when: k3s_bootstrap |
||||
|
||||
@ -1,4 +1,4 @@ |
||||
- name: join node to cluster |
||||
shell: "curl -sfL https://get.k3s.io | K3S_TOKEN={{ k3s_token }} sh -s - server --server https://{{ k3s_master_address }}>:6443" |
||||
shell: "curl -sfL https://get.k3s.io | K3S_TOKEN={{ k3s_node_token }} sh -s - server --server https://{{ k3s_master_address }}>:6443" |
||||
become: yes |
||||
when: k3s_bootstrap |
||||
|
||||
Loading…
Reference in new issue