Refactor from throttle to serial
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
333670a73b
commit
ebc5ed45b1
29
playbook.yml
29
playbook.yml
@ -98,24 +98,21 @@
|
|||||||
gather_facts: false
|
gather_facts: false
|
||||||
vars_files:
|
vars_files:
|
||||||
- cluster.k3s.yml
|
- cluster.k3s.yml
|
||||||
|
serial: 1
|
||||||
tasks:
|
tasks:
|
||||||
|
|
||||||
- name: Iterate over hosts
|
- name: Install K3s binary
|
||||||
block:
|
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') }}"
|
||||||
|
environment:
|
||||||
|
K3S_TOKEN: "{{ cluster.mastertoken | default('', true) }}"
|
||||||
|
K3S_URL: "{{ cluster.apiurl | default('', true) }}"
|
||||||
|
|
||||||
- name: Install K3s binary
|
- name: Retrieve token & reference new cluster
|
||||||
ansible.builtin.shell:
|
ansible.builtin.set_fact:
|
||||||
cmd: "curl -sfL https://get.k3s.io | sh -s - server --cluster-init --disable local-storage,traefik --tls-san {{ cluster.virtualip | ansible.utils.ipaddr('address') }}"
|
cluster: "{{ cluster | combine( { mastertoken: '{{ lookup(''file'', /var/lib/rancher/k3s/server/token) }}' }, { apiurl: 'https://{{ cluster.virtualip | ansible.utils.ipaddr(''address'') }}:6443' } ) }}"
|
||||||
environment:
|
when: cluster.mastertoken is not defined
|
||||||
K3S_TOKEN: "{{ cluster.mastertoken | default('', true) }}"
|
|
||||||
K3S_URL: "{{ cluster.apiurl | default('', true) }}"
|
|
||||||
|
|
||||||
- name: Retrieve token & reference new cluster
|
- ansible.builtin.debug:
|
||||||
ansible.builtin.set_fact:
|
var: cluster
|
||||||
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
|
|
||||||
|
Loading…
Reference in New Issue
Block a user