From ce3b3033215ab34afb72ad1b59ec11ab010832c1 Mon Sep 17 00:00:00 2001 From: Mark Goddard Date: Tue, 13 Mar 2018 12:43:16 +0000 Subject: [PATCH] Only use eth1 interface on the controller if it exists For testing we can use a bridge without any ports. --- .../inventory/group_vars/controllers/network-interfaces | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/kayobe/inventory/group_vars/controllers/network-interfaces b/etc/kayobe/inventory/group_vars/controllers/network-interfaces index c46713d..e07607c 100644 --- a/etc/kayobe/inventory/group_vars/controllers/network-interfaces +++ b/etc/kayobe/inventory/group_vars/controllers/network-interfaces @@ -4,8 +4,8 @@ # Controller interface on all-in-one network. aio_interface: breth1 -aio_bridge_ports: - - eth1 +# Use eth1 if it exists, otherwise the bridge will have no ports. +aio_bridge_ports: "{{ ['eth1'] if 'ansible_eth1' in hostvars[inventory_hostname] else [] }}" ############################################################################### # Dummy variable to allow Ansible to accept this file.