summaryrefslogtreecommitdiffstats
path: root/xci/playbooks/roles/configure-network/templates/suse
diff options
context:
space:
mode:
authorMarkos Chandras <mchandras@suse.de>2018-02-15 08:57:47 +0000
committerMarkos Chandras <mchandras@suse.de>2018-02-21 17:37:05 +0000
commitcdcfb32414af77abac43440e0ab5b448e72d83e5 (patch)
tree600f06e58f54db46be3072794237762eb02e72e1 /xci/playbooks/roles/configure-network/templates/suse
parent7c37b9ac8715ebedecf903f9de67c55830fb5b90 (diff)
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 <mchandras@suse.de>
Diffstat (limited to 'xci/playbooks/roles/configure-network/templates/suse')
-rw-r--r--xci/playbooks/roles/configure-network/templates/suse/suse.interface.j22
1 files changed, 1 insertions, 1 deletions
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 %}