c12s-kubespray/roles/docker/tasks/configure.yml

34 lines
980 B
YAML
Raw Normal View History

2015-10-03 20:19:50 +00:00
---
- name: Write script for calico/docker bridge configuration
template: src=create_cbr.j2 dest=/etc/network/if-up.d/create_cbr mode=u+x
2015-10-27 14:42:46 +00:00
when: kube_network_plugin is defined and kube_network_plugin == "calico"
2015-10-03 20:19:50 +00:00
- name: Configure calico/docker bridge
2015-11-01 10:12:12 +00:00
command: /etc/network/if-up.d/create_cbr
2015-10-27 14:42:46 +00:00
when: kube_network_plugin is defined and kube_network_plugin == "calico"
2015-10-03 20:19:50 +00:00
- name: Configure docker to use cbr0 bridge
lineinfile:
dest=/etc/default/docker
regexp='.*DOCKER_OPTS=.*'
line='DOCKER_OPTS="--bridge=cbr0 --iptables=false --ip-masq=false"'
notify:
- restart docker
2015-10-27 14:42:46 +00:00
when: kube_network_plugin is defined and kube_network_plugin == "calico"
2015-10-03 20:19:50 +00:00
- name: enable docker
service:
name: docker
enabled: yes
state: started
tags:
- docker
- meta: flush_handlers
#- name: login to arkena's docker registry
# shell : >
# docker login --username={{ dockerhub_user }}
# --password={{ dockerhub_pass }}
# --email={{ dockerhub_email }}