17 lines
617 B
YAML
17 lines
617 B
YAML
---
|
|
- name: "Test if network plugin is defined"
|
|
fail: msg="ERROR, One network_plugin variable must be defined (Flannel or Calico)"
|
|
when: ( kube_network_plugin is defined and kube_network_plugin == "calico" and kube_network_plugin == "flannel" ) or
|
|
kube_network_plugin is not defined
|
|
|
|
- include: flannel.yml
|
|
when: kube_network_plugin == "flannel"
|
|
|
|
- name: Calico | Write network-environment
|
|
template: src=calico/network-environment.j2 dest=/etc/network-environment mode=u+x
|
|
when: kube_network_plugin == "calico"
|
|
|
|
- include: calico.yml
|
|
when: kube_network_plugin == "calico"
|
|
|
|
- meta: flush_handlers
|