Add enabled to pkgs to handle ipvs

Some packages requirements depends on inventory variables
(`kube_proxy_mode` in that case but it could apply to others).

As the case seems pretty rare, instead of adding complexity to pkgs, we
add an escape hatch to use jinja conditions.
That should be revisited if we find ourselves shoehorning lots of logic
in this later on.
This commit is contained in:
Max Gautier
2024-04-29 15:31:27 +02:00
parent 11f35e462c
commit 088b1b0cec
4 changed files with 14 additions and 4 deletions

View File

@@ -6,9 +6,6 @@ epel_enabled: false
# Kubespray sets this to true after clusterDNS is running to apply changes to the host resolv.conf
dns_late: false
common_required_pkgs:
- "{{ kube_proxy_mode == 'ipvs' | ternary(['ipvsadm', 'ipset'], []) }}"
# Set to true if your network does not support IPv6
# This may be necessary for pulling Docker images from
# GCE docker repository