mirror of
https://github.com/techno-tim/k3s-ansible.git
synced 2026-09-14 16:13:18 +02:00
1687a3b098
- gate the control-plane VIP and kube-vip service LB on kube_vip_enabled - gate the MetalLB manifest and pool on metal_lb_enabled - add argument_specs entries in both roles - document both switches in sample inventory and README - update metal_lb deploy-condition test and add a kube-vip deploy-condition test
26 lines
909 B
YAML
26 lines
909 B
YAML
---
|
|
- name: Deploy calico
|
|
ansible.builtin.include_tasks: calico.yml
|
|
tags: calico
|
|
when: calico_iface is defined and cilium_iface is not defined
|
|
|
|
- name: Deploy cilium
|
|
ansible.builtin.include_tasks: cilium.yml
|
|
tags: cilium
|
|
when: cilium_iface is defined
|
|
|
|
- name: Deploy metallb pool
|
|
ansible.builtin.include_tasks: metallb.yml
|
|
tags: metallb
|
|
# Deploy MetalLB unless explicitly disabled, kube-vip owns the load balancer
|
|
# IP range, or Cilium BGP is enabled (Cilium then provides its own load
|
|
# balancing). The cilium_bgp default keeps this safe when Cilium variables are
|
|
# not in scope at all (#644) while still deploying MetalLB when a non-BGP
|
|
# Cilium CNI is in use.
|
|
when: metal_lb_enabled and kube_vip_lb_ip_range is not defined and not (cilium_bgp | default(false) | bool)
|
|
|
|
- name: Remove tmp directory used for manifests
|
|
ansible.builtin.file:
|
|
path: /tmp/k3s
|
|
state: absent
|