From bd064e809486b1704658078644652d3bf9fd4ad2 Mon Sep 17 00:00:00 2001 From: Paul Czarkowski Date: Sun, 8 May 2016 23:42:42 -0500 Subject: [PATCH] fix flannel's cross vm networking for vagrant * set flannel backend type to `host-gw` * set flannel interface to be eth1 ip --- Vagrantfile | 4 +++- roles/network_plugin/flannel/tasks/main.yml | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Vagrantfile b/Vagrantfile index c5cc7f5fd..288ad5be0 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -90,7 +90,9 @@ Vagrant.configure("2") do |config| ip = "#{$subnet}.#{i+100}" host_vars[vm_name] = { "ip" => ip, - "access_ip" => ip + "access_ip" => ip, + "flannel_interface" => ip, + "flannel_backend_type" => "host-gw" } config.vm.network :private_network, ip: ip diff --git a/roles/network_plugin/flannel/tasks/main.yml b/roles/network_plugin/flannel/tasks/main.yml index b59880463..55c47d211 100644 --- a/roles/network_plugin/flannel/tasks/main.yml +++ b/roles/network_plugin/flannel/tasks/main.yml @@ -4,6 +4,7 @@ src: network.json dest: /etc/flannel-network.json backup: yes + - name: Flannel | Create flannel pod manifest template: src: flannel-pod.yml