network_facts: streamline set_fact and setup calls (#12982)

- invoke setup module only once to gather ipv4 and ipv6 addresses
- eliminate remaining use of `fallback_ip` and `fallback_ip6`, allowing
  us to define (with `set_fact` all the "computed" IPs variable in one
  go, since there is no longer a dependency between them.

Co-authored-by: Max Gautier <mg@max.gautier.name>
This commit is contained in:
k8s-infra-cherrypick-robot
2026-02-10 04:04:00 -08:00
committed by GitHub
parent f23796e09d
commit 4598ba2e57
3 changed files with 31 additions and 53 deletions

View File

@@ -1,7 +1,7 @@
---
- name: Kubeadm | Check api is up
uri:
url: "https://{{ ip | default(fallback_ip) }}:{{ kube_apiserver_port }}/healthz"
url: "https://{{ main_ip | ansible.utils.ipwrap }}:{{ kube_apiserver_port }}/healthz"
validate_certs: false
when: ('kube_control_plane' in group_names)
register: _result