kubespray/roles/network_plugin/tasks/main.yml

31 lines
818 B
YAML
Raw Normal View History

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-10-27 22:42:46 +08:00
- include: flannel.yml
when: kube_network_plugin == "flannel"
2015-11-17 05:20:41 +08:00
2016-01-09 17:45:50 +08:00
- name: Set docker daemon options
template:
src: docker
dest: "/etc/default/docker"
owner: root
group: root
mode: 0644
notify:
- restart docker
- name: Write docker.service systemd file
template:
src: systemd-docker.service
dest: /lib/systemd/system/docker.service
notify: restart systemd-docker
when: init_system == "systemd"
2015-10-27 22:42:46 +08:00
- meta: flush_handlers
2016-01-09 17:45:50 +08:00
- include: calico.yml
when: kube_network_plugin == "calico"