2018-08-23 22:17:18 +08:00
|
|
|
---
|
|
|
|
- name: "Check vars defined correctly"
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- "calico_pool_name is defined"
|
2018-10-18 03:27:11 +08:00
|
|
|
- "calico_pool_name is match('^[a-zA-Z0-9-_\\\\.]{2,63}$')"
|
2020-03-12 16:20:37 +08:00
|
|
|
msg: "calico_pool_name contains invalid characters"
|
|
|
|
|
|
|
|
- name: "Check calico network backend defined correctly"
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- "calico_network_backend in ['bird', 'vxlan', 'none']"
|
|
|
|
msg: "calico network backend is not 'bird', 'vxlan' or 'none'"
|
|
|
|
when:
|
|
|
|
- calico_network_backend is defined
|
|
|
|
|
|
|
|
- name: "Check ipip and vxlan mode defined correctly"
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- "calico_ipip_mode in ['Always', 'CrossSubnet', 'Never']"
|
|
|
|
- "calico_vxlan_mode in ['Always', 'CrossSubnet', 'Never']"
|
|
|
|
msg: "calico inter host encapsulation mode is not 'Always', 'CrossSubnet' or 'Never'"
|
|
|
|
|
|
|
|
- name: "Check ipip and vxlan mode if simultaneously enabled"
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- "calico_vxlan_mode in ['Never']"
|
|
|
|
msg: "IP in IP and VXLAN mode is mutualy exclusive modes"
|
|
|
|
when:
|
|
|
|
- "calico_ipip_mode in ['Always', 'CrossSubnet']"
|
|
|
|
|
|
|
|
- name: "Check ipip and vxlan mode if simultaneously enabled"
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- "calico_ipip_mode in ['Never']"
|
|
|
|
msg: "IP in IP and VXLAN mode is mutualy exclusive modes"
|
|
|
|
when:
|
|
|
|
- "calico_vxlan_mode in ['Always', 'CrossSubnet']"
|