diff --git a/playbook.yml b/playbook.yml index 1047265..1e853d4 100644 --- a/playbook.yml +++ b/playbook.yml @@ -125,11 +125,14 @@ - name: Additional nodes block: + - ansible.builtin.debug: + var: hostvars[ansible_play_hosts[0]] + - name: Install K3s binary ansible.builtin.shell: cmd: "curl -sfL https://get.k3s.io | sh -s - server --disable local-storage,traefik" environment: - K3S_TOKEN: "{{ cluster.token }}" + K3S_TOKEN: "{{ hostvars[ansible_play_hosts[0]]['cluster.token'] }}" K3S_URL: "{{ 'https://' + ( cluster.virtualip | ansible.utils.ipaddr('address') ) + ':6443' }}" when: inventory_hostname != ansible_play_hosts[0]