From cdcfb32414af77abac43440e0ab5b448e72d83e5 Mon Sep 17 00:00:00 2001 From: Markos Chandras Date: Thu, 15 Feb 2018 08:57:47 +0000 Subject: xci: roles: configure-network: Determine host NIC from Ansible facts Hardcoding the interface as a variable is very fragile since it varies from host to host. We could use the Ansible facts to find out the interface name and then use that to configure all the VLANs and networking. Change-Id: Ie7e2409d638625b9bede23b6c1fe33dc36f81840 Signed-off-by: Markos Chandras --- xci/playbooks/roles/configure-network/templates/suse/suse.interface.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xci/playbooks/roles/configure-network/templates/suse/suse.interface.j2') diff --git a/xci/playbooks/roles/configure-network/templates/suse/suse.interface.j2 b/xci/playbooks/roles/configure-network/templates/suse/suse.interface.j2 index ffa418d4..27b01eb4 100644 --- a/xci/playbooks/roles/configure-network/templates/suse/suse.interface.j2 +++ b/xci/playbooks/roles/configure-network/templates/suse/suse.interface.j2 @@ -1,7 +1,7 @@ STARTMODE='auto' BOOTPROTO='static' {% if item.vlan_id is defined %} -ETHERDEVICE={{ interface }} +ETHERDEVICE={{ ansible_default_ipv4.interface }} VLAN_ID={{ item.vlan_id }} {% endif %} {% if item.bridge_ports is defined %} -- cgit 1.2.3-korg