Remove serialized collect of ansible_default_ipv4

The fallback_ips tasks are essentially serializing the gathering of one
fact on all the hosts, which can have dramatic performance implications
on large clusters (several minutes).

This is essentially a reversal of 35f248dff0
Being able to run without refreshing the cache facts is not worth it.

We keep fallback_ip for now, simply changing the access to a normal
hostvars variable instead of a custom dictionnary.
This commit is contained in:
Max Gautier
2024-09-30 14:24:51 +02:00
parent ddd92c998c
commit 2826b357d4
14 changed files with 34 additions and 58 deletions

View File

@@ -2,7 +2,7 @@
# Flannel public IP
# The address that flannel should advertise as how to access the system
# Disabled until https://github.com/coreos/flannel/issues/712 is fixed
# flannel_public_ip: "{{ access_ip | default(ip | default(fallback_ips[inventory_hostname])) }}"
# flannel_public_ip: "{{ access_ip | default(ip | default(fallback_ip)) }}"
## interface that should be used for flannel operations
## This is actually an inventory cluster-level item