diff --git a/linux/k3s/master/tasks/main.yml b/linux/k3s/master/tasks/main.yml index aa25609..7e98815 100644 --- a/linux/k3s/master/tasks/main.yml +++ b/linux/k3s/master/tasks/main.yml @@ -9,5 +9,5 @@ when: ansible_distribution|lower == 'debian' - name: run cluster init on first node - shell: "curl -sfL https://get.k3s.io | K3S_TOKEN={{ k3s_master_token }} sh -s - server --cluster-init" + shell: "curl -sfL https://get.k3s.io | K3S_TOKEN={{ k3s_master_token }} sh -s - server --cluster-init --node-ip {{ k3s_node_address }}" when: k3s_bootstrap diff --git a/linux/k3s/node/tasks/main.yml b/linux/k3s/node/tasks/main.yml index 7c4c4a8..70295aa 100644 --- a/linux/k3s/node/tasks/main.yml +++ b/linux/k3s/node/tasks/main.yml @@ -9,6 +9,6 @@ when: ansible_distribution|lower == 'debian' - name: join node to cluster - shell: "curl -sfL https://get.k3s.io | K3S_TOKEN={{ k3s_node_token }} sh -s - server --server https://{{ k3s_master_address }}:6443 && sleep 5" + shell: "curl -sfL https://get.k3s.io | K3S_TOKEN={{ k3s_node_token }} sh -s - server --server https://{{ k3s_master_address }}:6443 --node-ip {{ k3s_node_address }} && sleep 5" when: k3s_bootstrap throttle: 1