---
- name: Check the provider network configuration
  fail:
    msg: "Flannel SDN requires a dedicated containers data network and can not work over a provider network"
  when:
    - openshift_openstack_provider_network_name is defined
    - openstack_private_data_network_name is defined

- name: Check the flannel network configuration
  fail:
    msg: "A dedicated containers data network is only supported with Flannel SDN"
  when:
    - openstack_private_data_network_name is defined
    - not openshift_use_flannel|default(False)|bool

- name: Check the kuryr public net configuration
  fail:
    msg: "kuryr_openstack_public_net_id must be set when using Kuryr SDN"
  when:
    - openshift_use_kuryr|default(False)|bool
    - not kuryr_openstack_public_net_id is defined
