diff options
author | Markos Chandras <mchandras@suse.de> | 2018-05-16 15:59:23 +0100 |
---|---|---|
committer | Markos Chandras <mchandras@suse.de> | 2018-05-16 16:37:19 +0100 |
commit | 1230e9c0fd38c8e9da3f65a245f737e99c122829 (patch) | |
tree | 42f67d22850d541be3f1b878b5b488c18dd631f9 /xci/playbooks/roles/bootstrap-host/templates/osa/debian.interface.j2 | |
parent | 8dc9f3a0d2c4db3bd9720966043dda0d2d4431bb (diff) |
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 <mchandras@suse.de>
Diffstat (limited to 'xci/playbooks/roles/bootstrap-host/templates/osa/debian.interface.j2')
-rw-r--r-- | xci/playbooks/roles/bootstrap-host/templates/osa/debian.interface.j2 | 12 |
1 files changed, 5 insertions, 7 deletions
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 %} |