update: add k3s_url_ip variable to configuration files and update references in Ansible playbooks

This commit is contained in:
jon brookes 2025-08-09 13:32:07 +01:00
parent ae59661982
commit 34fbe9b5b3
5 changed files with 18 additions and 14 deletions

View file

@ -6,8 +6,7 @@
serial: 1 # Ensure tasks are executed one host at a time
vars_files:
- vault.yml
- vars.yml
- vars.yaml
vars:
tailscale_host: "{{ hostvars[inventory_hostname]['tailscale_host'] }}"
@ -22,6 +21,9 @@
# msg: "{{ item.key }}: {{ item.value.ipv4 | map(attribute='address') | list }}"
# with_dict: "{{ ansible_facts['network_interfaces'] }}"
# when: ansible_facts['network_interfaces'] is defined
# - name: Debug k3s_url_ip
# ansible.builtin.debug:
# msg: "k3s_url_ip: {{ k3s_url_ip }}"
- name: Detect interface with the desired IP range
ansible.builtin.set_fact:
@ -65,7 +67,7 @@
auth_pass mysecret
}
virtual_ipaddress {
192.168.56.250
{{ k3s_url_ip }}
}
}
owner: root