From 8a4fd50fb71059fc58b39a2535348ee21a6c9aff Mon Sep 17 00:00:00 2001 From: Genti Topija Date: Thu, 15 Dec 2016 13:11:19 +0100 Subject: [PATCH] Fix Flannel network on CoreOS Resolves: #748 --- .../network_plugin/flannel/templates/flannel-options.conf.j2 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/roles/network_plugin/flannel/templates/flannel-options.conf.j2 b/roles/network_plugin/flannel/templates/flannel-options.conf.j2 index 62dcb1e41..e7758736c 100644 --- a/roles/network_plugin/flannel/templates/flannel-options.conf.j2 +++ b/roles/network_plugin/flannel/templates/flannel-options.conf.j2 @@ -1,2 +1,6 @@ [Service] +{% if ansible_os_family == "CoreOS" %} +Environment="DOCKER_OPT_BIP=--bip={{ flannel_subnet }} --mtu={{ flannel_mtu }}" +{% else %} Environment="DOCKER_NETWORK_OPTIONS=--bip={{ flannel_subnet }} --mtu={{ flannel_mtu }}" +{% endif %}