You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
1.2 KiB

  1. ---
  2. - name: "Check vars defined correctly"
  3. assert:
  4. that:
  5. - "calico_pool_name is defined"
  6. - "calico_pool_name is match('^[a-zA-Z0-9-_\\\\.]{2,63}$')"
  7. msg: "calico_pool_name contains invalid characters"
  8. - name: "Check calico network backend defined correctly"
  9. assert:
  10. that:
  11. - "calico_network_backend in ['bird', 'vxlan', 'none']"
  12. msg: "calico network backend is not 'bird', 'vxlan' or 'none'"
  13. when:
  14. - calico_network_backend is defined
  15. - name: "Check ipip and vxlan mode defined correctly"
  16. assert:
  17. that:
  18. - "calico_ipip_mode in ['Always', 'CrossSubnet', 'Never']"
  19. - "calico_vxlan_mode in ['Always', 'CrossSubnet', 'Never']"
  20. msg: "calico inter host encapsulation mode is not 'Always', 'CrossSubnet' or 'Never'"
  21. - name: "Check ipip and vxlan mode if simultaneously enabled"
  22. assert:
  23. that:
  24. - "calico_vxlan_mode in ['Never']"
  25. msg: "IP in IP and VXLAN mode is mutualy exclusive modes"
  26. when:
  27. - "calico_ipip_mode in ['Always', 'CrossSubnet']"
  28. - name: "Check ipip and vxlan mode if simultaneously enabled"
  29. assert:
  30. that:
  31. - "calico_ipip_mode in ['Never']"
  32. msg: "IP in IP and VXLAN mode is mutualy exclusive modes"
  33. when:
  34. - "calico_vxlan_mode in ['Always', 'CrossSubnet']"