---
- fail:
    msg: Contrail doesn't support CRI-O
  when: openshift_use_crio_only | default(false) | bool

- name: Run kube proxy
  import_role:
    name: kube_proxy_and_dns
  when: inventory_hostname == groups.masters.0

- name: Get contrail nodes and ips
  import_role:
    name: contrail_common

- name: Create contrail controller components and Daemonsets
  include_tasks: os_contrail_master.yaml
  when:
    - not nested_mode_contrail | default(false) | bool
    - contrail_masters | length > 0

- name: Create contrail nested components
  include_tasks: os_contrail_nested.yaml
  when:
    - nested_mode_contrail | default(false) | bool
    - contrail_masters | length > 0
