diff --git a/playbook.yml b/playbook.yml index d61b9a6..b87fe1e 100644 --- a/playbook.yml +++ b/playbook.yml @@ -111,6 +111,10 @@ src: /var/lib/rancher/k3s/server/token register: k3s_token + # testing + - ansible.builtin.set_fact: + cluster: "{{ cluster | combine( { 'token': ( k3s_token.content | b64decode | trim ) } ) }}" + - name: Initial node -- Store token ansible.builtin.set_fact: clustertoken: "{{ k3s_token.content | b64decode | trim }}" @@ -147,6 +151,9 @@ port: 6443 timeout: 300 + # testing + - ansible.builtin.debug: + msg: "{{ lookup(hostvars[ansible_play_hosts[0]], cluster) }}" - name: Additional nodes -- Install K3s binary ansible.builtin.shell: cmd: "curl -sfL https://get.k3s.io | sh -s - server --disable local-storage,traefik"