Refactor from throttle to serial
Some checks reported errors
continuous-integration/drone/push Build encountered an error

This commit is contained in:
Danny Bessems 2022-04-20 10:54:01 +02:00
parent 333670a73b
commit ebc5ed45b1

View File

@ -98,11 +98,9 @@
gather_facts: false
vars_files:
- cluster.k3s.yml
serial: 1
tasks:
- name: Iterate over hosts
block:
- name: Install K3s binary
ansible.builtin.shell:
cmd: "curl -sfL https://get.k3s.io | sh -s - server --cluster-init --disable local-storage,traefik --tls-san {{ cluster.virtualip | ansible.utils.ipaddr('address') }}"
@ -112,10 +110,9 @@
- name: Retrieve token & reference new cluster
ansible.builtin.set_fact:
cluster: "{{ cluster | combine( { mastertoken: '{{ lookup(''file'', /var/lib/rancher/k3s/server/token) }}' }, { apiurl: 'https://{{ cluster.virtualip | ansible.utils.ipaddr('address') }}:6443' } ) }}"
cluster: "{{ cluster | combine( { mastertoken: '{{ lookup(''file'', /var/lib/rancher/k3s/server/token) }}' }, { apiurl: 'https://{{ cluster.virtualip | ansible.utils.ipaddr(''address'') }}:6443' } ) }}"
when: cluster.mastertoken is not defined
- ansible.builtin.debug:
var: cluster
throttle: 1