Redeploy to fully test code
continuous-integration/drone/push Build encountered an error Details

This commit is contained in:
Danny Bessems 2022-04-21 09:01:38 +02:00
parent caf34e6ad6
commit 61d84177c0
1 changed files with 3 additions and 11 deletions

View File

@ -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