diff options
author | Markos Chandras <mchandras@suse.de> | 2018-02-15 08:57:47 +0000 |
---|---|---|
committer | Markos Chandras <mchandras@suse.de> | 2018-02-21 17:37:05 +0000 |
commit | cdcfb32414af77abac43440e0ab5b448e72d83e5 (patch) | |
tree | 600f06e58f54db46be3072794237762eb02e72e1 /xci/playbooks/roles/configure-network/templates/redhat | |
parent | 7c37b9ac8715ebedecf903f9de67c55830fb5b90 (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/redhat')
-rw-r--r-- | xci/playbooks/roles/configure-network/templates/redhat/interface.ifcfg.j2 | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xci/playbooks/roles/configure-network/templates/redhat/interface.ifcfg.j2 b/xci/playbooks/roles/configure-network/templates/redhat/interface.ifcfg.j2 index b0dea0f5..a97ad0cf 100644 --- a/xci/playbooks/roles/configure-network/templates/redhat/interface.ifcfg.j2 +++ b/xci/playbooks/roles/configure-network/templates/redhat/interface.ifcfg.j2 @@ -4,7 +4,7 @@ ONBOOT=yes BOOTPROTO=none {% if item.vlan_id is defined %} VLAN=yes -ETHERDEVICE={{ interface }} +ETHERDEVICE={{ ansible_default_ipv4.interface }} VLAN_ID={{ item.vlan_id }} {% endif %} BRIDGE={{ item.bridge }} |