Test delegate_to icw set_fact
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Danny Bessems 2022-04-21 08:52:54 +02:00
parent d1ff19b841
commit caf34e6ad6
1 changed files with 8 additions and 1 deletions

View File

@ -137,7 +137,6 @@
src: kube-vip.j2
dest: /var/lib/rancher/k3s/server/manifests/kube-vip.yml
# when: inventory_hostname == ansible_play_hosts[0]
delegate_to: "{{ ansible_play_hosts[0] }}"
run_once: true
@ -157,3 +156,11 @@
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