From 7c2785e083e4abbdf1008bf6ea2e57ebcb6d87de Mon Sep 17 00:00:00 2001 From: Genti Topija Date: Thu, 15 Dec 2016 14:12:34 +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 %}