From 1230e9c0fd38c8e9da3f65a245f737e99c122829 Mon Sep 17 00:00:00 2001 From: Markos Chandras Date: Wed, 16 May 2018 15:59:23 +0100 Subject: xci: bootstrap-host: Fetch netmask information from IDF The IDF file contains the netmask for every network so we should use that information instead of using hardcoded values. Change-Id: Ie798cb49563bdb72fdfb7b6e9e269692bf1f7bc9 Signed-off-by: Markos Chandras --- .../roles/bootstrap-host/templates/osa/debian.interface.j2 | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'xci/playbooks/roles/bootstrap-host/templates/osa/debian.interface.j2') diff --git a/xci/playbooks/roles/bootstrap-host/templates/osa/debian.interface.j2 b/xci/playbooks/roles/bootstrap-host/templates/osa/debian.interface.j2 index 56db509b..3eddce45 100644 --- a/xci/playbooks/roles/bootstrap-host/templates/osa/debian.interface.j2 +++ b/xci/playbooks/roles/bootstrap-host/templates/osa/debian.interface.j2 @@ -25,14 +25,12 @@ iface {{ item.name }} inet static post-down ip link del br-vlan-veth || true bridge_ports br-vlan-veth {% endif %} -{% if item.ip is defined %} - address {{ item.ip }} +{% if item.network is defined %} + address {{ item.network.address | ipaddr('address') }} + netmask {{ item.network.address | ipaddr('netmask') }} {% endif %} -{% if item.prefix is defined %} - netmask {{ item.prefix }} -{% endif %} -{% if item.gateway is defined %} - gateway {{ item.gateway }} +{% if item.network is defined and item.network.gateway is defined %} + gateway {{ item.network.gateway | ipaddr('address') }} {% endif %} {% endif %} -- cgit 1.2.3-korg