Split kubespray-defaults (-> network_facts)

kubespray-defaults currently does two things:
- records a number of default variable values (in particular values used
  in several places)
- gather and compose some complex network facts (in particular,
  `fallback_ip` and `no_proxy`

There is no actual reason to couple those two things, and it makes using
defaults more difficult (because computing the network facts is somewhat
expensive, we don't want to do it willy-nilly)

Split the two and adjust import paths as needed.
This commit is contained in:
Max Gautier
2025-05-02 15:30:44 +02:00
parent bb4b2af02e
commit 25e4fa17a8
8 changed files with 14 additions and 1 deletions

View File

@@ -7,13 +7,15 @@
environment: "{{ proxy_disable_env }}"
roles:
- { role: bootstrap-os, tags: bootstrap-os}
- { role: kubespray-defaults }
- name: Gather facts
hosts: k8s_cluster:etcd:calico_rr
gather_facts: false
tags: always
tasks:
- name: Gather and compute network facts
import_role:
name: network_facts
- name: Gather minimal facts
setup:
gather_subset: '!all'