diff --git a/playbook.yml b/playbook.yml index d573403..83971f7 100644 --- a/playbook.yml +++ b/playbook.yml @@ -120,7 +120,9 @@ var: k3s_token - name: Add to dictionary - cluster: "{{ cluster | combine( { 'mastertoken': k3s_token }, { 'apiurl': \"https://{{ cluster.virtualip | ansible.utils.ipaddr('address') }}:6443\" } ) }}" + ansible.builtin.set_fact: + cluster: "{{ cluster | combine( { 'mastertoken': k3s_token }, { 'apiurl': \"https://{{ cluster.virtualip | ansible.utils.ipaddr('address') }}:6443\" } ) }}" + when: cluster.mastertoken is not defined - ansible.builtin.debug: