k3s-ansible
k3s-ansible copied to clipboard
MetalLB server tasks causing error when cilium is not being defined.
I was running this collection via galaxy for a larger system I am setting up, and I had decided not to use cilium since it looks like it's still being worked on and went with the default flannel for now.
I only included the group_vars I needed, excluding all vars for cilium and calico. I received an error when it was trying to call the metallb tasks in both the k3s_server and k3s_server_post roles. I just quickly fixed it for myself in my collection copy, then have set up a pull request to fix it.
Here is the actual error:
FAILED! => {"msg": "The conditional check 'kube_vip_lb_ip_range is not defined and (not cilium_bgp or cilium_iface is not defined)' failed. The error was: error while evaluating conditional (kube_vip_lb_ip_range is not defined and (not cilium_bgp or cilium_iface is not defined)): 'cilium_bgp' is undefined. 'cilium_bgp' is undefined\n\nThe error appears to be in '~/.ansible/collections/ansible_collections/techno_tim/k3s_ansible/roles/k3s_server_post/tasks/main.yml': line 12, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Deploy metallb pool\n ^ here\n"}
See #513 for the fix.