Change syntax
continuous-integration/drone/push Build encountered an error Details

This commit is contained in:
Danny Bessems 2022-04-20 13:59:24 +02:00
parent d4a9cacb98
commit fcf3353502
1 changed files with 1 additions and 8 deletions

View File

@ -118,21 +118,14 @@
when: inventory_hostname == ansible_play_hosts[0]
- ansible.builtin.debug:
var: cluster
- 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: "{{ hostvars[ansible_play_hosts[0]]['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]