From 61d84177c0ba4632c1407f32e03ade72ead5b58c Mon Sep 17 00:00:00 2001 From: djpbessems Date: Thu, 21 Apr 2022 09:01:38 +0200 Subject: [PATCH] Redeploy to fully test code --- playbook.yml | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/playbook.yml b/playbook.yml index 31b44b4..05afbfb 100644 --- a/playbook.yml +++ b/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