2015-10-27 22:42:46 +08:00
|
|
|
---
|
|
|
|
- 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
|
|
|
|
|
2015-12-11 18:44:41 +08:00
|
|
|
- name: Write network-environment
|
|
|
|
template: src=network-environment.j2 dest=/etc/network-environment mode=u+x
|
|
|
|
|
2015-10-27 22:42:46 +08:00
|
|
|
- include: flannel.yml
|
|
|
|
when: kube_network_plugin == "flannel"
|
2015-11-17 05:20:41 +08:00
|
|
|
|
2015-10-27 22:42:46 +08:00
|
|
|
- include: calico.yml
|
|
|
|
when: kube_network_plugin == "calico"
|
|
|
|
|
|
|
|
- meta: flush_handlers
|