Change fact reference to initial node
Some checks reported errors
continuous-integration/drone/push Build encountered an error
Some checks reported errors
continuous-integration/drone/push Build encountered an error
This commit is contained in:
parent
5c5e3558de
commit
d4a9cacb98
@ -125,11 +125,14 @@
|
|||||||
- name: Additional nodes
|
- name: Additional nodes
|
||||||
block:
|
block:
|
||||||
|
|
||||||
|
- ansible.builtin.debug:
|
||||||
|
var: hostvars[ansible_play_hosts[0]]
|
||||||
|
|
||||||
- name: Install K3s binary
|
- name: Install K3s binary
|
||||||
ansible.builtin.shell:
|
ansible.builtin.shell:
|
||||||
cmd: "curl -sfL https://get.k3s.io | sh -s - server --disable local-storage,traefik"
|
cmd: "curl -sfL https://get.k3s.io | sh -s - server --disable local-storage,traefik"
|
||||||
environment:
|
environment:
|
||||||
K3S_TOKEN: "{{ cluster.token }}"
|
K3S_TOKEN: "{{ hostvars[ansible_play_hosts[0]]['cluster.token'] }}"
|
||||||
K3S_URL: "{{ 'https://' + ( cluster.virtualip | ansible.utils.ipaddr('address') ) + ':6443' }}"
|
K3S_URL: "{{ 'https://' + ( cluster.virtualip | ansible.utils.ipaddr('address') ) + ':6443' }}"
|
||||||
|
|
||||||
when: inventory_hostname != ansible_play_hosts[0]
|
when: inventory_hostname != ansible_play_hosts[0]
|
||||||
|
Loading…
Reference in New Issue
Block a user