lay down a systemd dropin instead of the /run/flannel_docker_opts.env symlink
parent
7ac7fc33a7
commit
b74c2f89f0
|
@ -42,12 +42,14 @@
|
||||||
mode: 0644
|
mode: 0644
|
||||||
notify:
|
notify:
|
||||||
- restart docker
|
- restart docker
|
||||||
|
when: ansible_os_family != "CoreOS"
|
||||||
|
|
||||||
- name: Flannel | Create docker config symlink for CoreOS
|
- name: Flannel | Create docker dropin for CoreOS
|
||||||
file:
|
template:
|
||||||
src: "/etc/default/docker"
|
src: docker-dropin
|
||||||
dest: "/run/flannel_docker_opts.env"
|
dest: "/etc/systemd/system/docker.service.d/flannel-options.conf"
|
||||||
state: link
|
notify:
|
||||||
|
- restart docker
|
||||||
when: ansible_os_family == "CoreOS"
|
when: ansible_os_family == "CoreOS"
|
||||||
|
|
||||||
- meta: flush_handlers
|
- meta: flush_handlers
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
[Service]
|
||||||
|
Environment="DOCKER_OPTS=--bip={{ flannel_subnet }} --mtu={{ flannel_mtu }} {% if docker_options is defined %}{{ docker_options }}{% endif %}"
|
Loading…
Reference in New Issue