Redeploy to fully test code
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
caf34e6ad6
commit
61d84177c0
14
playbook.yml
14
playbook.yml
@ -104,7 +104,7 @@
|
||||
|
||||
- name: Initial node -- 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') }}"
|
||||
cmd: "curl -sfL https://get.k3s.io | sh -s - server --cluster-init --disable local-storage --tls-san {{ cluster.virtualip | ansible.utils.ipaddr('address') }}"
|
||||
|
||||
- name: Initial node -- Retrieve token
|
||||
ansible.builtin.slurp:
|
||||
@ -150,17 +150,9 @@
|
||||
|
||||
- name: Additional nodes -- Install K3s binary
|
||||
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"
|
||||
environment:
|
||||
K3S_TOKEN: "{{ (hostvars[ansible_play_hosts[0]]).cluster.token }}"
|
||||
K3S_TOKEN: "{{ cluster.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]
|
||||
|
||||
- ansible.builtin.debug:
|
||||
var: cluster
|
||||
- ansible.builtin.set_fact:
|
||||
cluster: "{{ cluster | combine( { 'token': ( k3s_token.content | b64decode | trim ) } ) }}"
|
||||
delegate_to: "{{ ansible_play_hosts[0] }}"
|
||||
- ansible.builtin.debug:
|
||||
var: cluster
|
||||
|
Loading…
Reference in New Issue
Block a user