Try different templating syntax
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
6ccc976054
commit
0bf389b333
@ -116,12 +116,9 @@
|
|||||||
src: /var/lib/rancher/k3s/server/token
|
src: /var/lib/rancher/k3s/server/token
|
||||||
register: k3s_token
|
register: k3s_token
|
||||||
|
|
||||||
- ansible.builtin.debug:
|
|
||||||
var: k3s_token
|
|
||||||
|
|
||||||
- name: Add to dictionary
|
- name: Add to dictionary
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
cluster: "{{ cluster | combine( { 'mastertoken': k3s_token }, { 'apiurl': \"https://{{ cluster.virtualip | ansible.utils.ipaddr('address') }}:6443\" } ) }}"
|
cluster: "{{ cluster | combine( { 'mastertoken': {{ k3s_token.contents | b64decode }} }, { 'apiurl': {{ 'https://' + {{ cluster.virtualip | ansible.utils.ipaddr('address') + ':6443' }} } ) }}"
|
||||||
|
|
||||||
when: cluster.mastertoken is not defined
|
when: cluster.mastertoken is not defined
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user