feat(ansible): add checks for verify kube-vip nic exists

Signed-off-by: Devin Buhl <devin@buhl.casa>
This commit is contained in:
Devin Buhl committed 2022-05-13 15:38:04 -04:00
1 parent 63d077e1dd
commit d02f6720e3
3 files changed
+23

No files matched your search

@@ -0,0 +1,17 @@
---
- name: Check if network interface provided for kube-vip is valid
ansible.builtin.assert:
that:
- ansible_{{ kubevip_interface }}.device is defined
- ansible_{{ kubevip_interface }}['ipv4']['address'] | ansible.utils.ipaddr('{{ ansible_host }}')
success_msg: |-
kube-vip is able to use {{ kubevip_interface }} for this node
fail_msg: |-
This node does not have a network interface called {{ kubevip_interface }}.
You either provided the wrong BOOTSTRAP_KUBE_VIP_INTERFACE value or your nodes have different network interface names.
See this link on how to set static interface names across your nodes by using netplan
https://askubuntu.com/a/1317043
when:
"'master' in group_names"
@@ -1,4 +1,8 @@
---
- include: checks.yml
tags:
- checks
- include: locale.yml
tags:
- locale