Ansible error using almost default values and metallb service LB
sharifm-informatica opened this issue · comments
Expected Behavior
playbook would run and install
Current Behavior
FATAL: 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 '/playbook/roles/k3s_server/tasks/main.yml': line 29, 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 manifest\n ^ here\n"}
Steps to Reproduce
- keep almost all groupvars at the default as per latest release
- run the playbook
cilium_bgp
is undefined as per old vars
if cilium_bgp
is defined the error does not occur. Possible breaking change for older configs
Possible Solution
1- change line 32 in /roles/k3s_server/tasks/main.yml
to when: kube_vip_lb_ip_range is not defined and (not cilium_bgp is not defined or cilium_iface is not defined)
2- change line 15 in /roles/k3s_server_post/tasks/main.yml
to when: kube_vip_lb_ip_range is not defined and (not cilium_bgp is not defined or cilium_iface is not defined)
This may require another case for when it is defined and false.
- [ x] I've checked the General Troubleshooting Guide
can you please attach your groupvars?