summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkos Chandras <mchandras@suse.de>2018-04-25 15:55:10 +0100
committerMarkos Chandras <mchandras@suse.de>2018-04-30 16:09:19 +0100
commit15be5eb8da9881428ea1635a3184c39f63dfaf80 (patch)
tree7e46c3fc275e1ee8222568087999a89bcd153567
parentbe67faf1cfaeb2f0d1ff73c90c8b3996b2b6a506 (diff)
xci: roles: bootstrap-host: Simplify configuration files
We split the networking task on distro specific files to make it easier to read. Moreover, the debian network configuration has been improved by simply sharing a common file across all nodes and also use the 'source' facility in the main /etc/network/interfaces file to use one configuration file per interface. Change-Id: Ic822fe6dc197227e70c0ba7cee812629df287d82 Signed-off-by: Markos Chandras <mchandras@suse.de>
-rw-r--r--xci/playbooks/roles/bootstrap-host/tasks/network.yml95
-rw-r--r--xci/playbooks/roles/bootstrap-host/tasks/network_debian.yml58
-rw-r--r--xci/playbooks/roles/bootstrap-host/tasks/network_redhat.yml37
-rw-r--r--xci/playbooks/roles/bootstrap-host/tasks/network_suse.yml45
-rw-r--r--xci/playbooks/roles/bootstrap-host/templates/osa/debian.interface.j238
-rw-r--r--xci/playbooks/roles/bootstrap-host/templates/osa/debian/compute00.interface.j275
l---------xci/playbooks/roles/bootstrap-host/templates/osa/debian/compute01.interface.j21
-rw-r--r--xci/playbooks/roles/bootstrap-host/templates/osa/debian/controller00.interface.j274
l---------xci/playbooks/roles/bootstrap-host/templates/osa/debian/controller01.interface.j21
l---------xci/playbooks/roles/bootstrap-host/templates/osa/debian/controller02.interface.j21
-rw-r--r--xci/playbooks/roles/bootstrap-host/templates/osa/debian/opnfv.interface.j266
-rw-r--r--xci/playbooks/roles/bootstrap-host/templates/osa/redhat.interface.j222
-rw-r--r--xci/playbooks/roles/bootstrap-host/templates/osa/redhat/bridge.ifcfg.j29
-rw-r--r--xci/playbooks/roles/bootstrap-host/templates/osa/redhat/interface.ifcfg.j210
-rw-r--r--xci/playbooks/roles/bootstrap-host/templates/osa/suse.interface.j2 (renamed from xci/playbooks/roles/bootstrap-host/templates/osa/suse/suse.interface.j2)0
-rw-r--r--xci/playbooks/roles/bootstrap-host/templates/osa/suse.routes.j2 (renamed from xci/playbooks/roles/bootstrap-host/templates/osa/suse/suse.routes.j2)0
16 files changed, 202 insertions, 330 deletions
diff --git a/xci/playbooks/roles/bootstrap-host/tasks/network.yml b/xci/playbooks/roles/bootstrap-host/tasks/network.yml
index 723db48d..a4f260c4 100644
--- a/xci/playbooks/roles/bootstrap-host/tasks/network.yml
+++ b/xci/playbooks/roles/bootstrap-host/tasks/network.yml
@@ -50,99 +50,8 @@
- name: Run handlers
meta: flush_handlers
-- block:
- - name: configure modules
- lineinfile:
- dest: /etc/modules
- state: present
- create: yes
- line: "8021q"
- - name: add modules
- modprobe:
- name: 8021q
- state: present
- - name: ensure interfaces.d folder is empty
- file:
- state: "{{ item }}"
- path: "/etc/network/interfaces.d"
- with_items:
- - absent
- - directory
- - name: ensure interfaces file is updated
- template:
- src: "{{ installer_type }}/{{ ansible_os_family | lower }}/{{ ansible_hostname }}.interface.j2"
- dest: "/etc/network/interfaces"
- - name: restart network service
- shell: "/sbin/ifconfig {{ ansible_local.xci.network.xci_interface }} 0 && /sbin/ifdown -a && /sbin/ifup -a"
- async: 15
- poll: 0
- when: ansible_os_family | lower == "debian"
-
-- block:
- - name: Configure networking on SUSE
- template:
- src: "{{ installer_type }}/{{ ansible_os_family | lower }}/suse.interface.j2"
- dest: "/etc/sysconfig/network/ifcfg-{{ item.name }}"
- with_items:
- - { name: "{{ ansible_local.xci.network.xci_interface }}" }
- - { name: "{{ ansible_local.xci.network.xci_interface }}.10", vlan_id: 10 }
- - { name: "{{ ansible_local.xci.network.xci_interface }}.30", vlan_id: 30 }
- - { name: "{{ ansible_local.xci.network.xci_interface }}.20", vlan_id: 20 }
- - { name: "br-mgmt", bridge_ports: "{{ ansible_local.xci.network.xci_interface }}.10", ip: "{{ host_info[inventory_hostname].MGMT_IP }}/22" }
- - { name: "br-vxlan", bridge_ports: "{{ ansible_local.xci.network.xci_interface }}.30", ip: "{{ host_info[inventory_hostname].VXLAN_IP }}/22" }
- - { name: "br-vlan", bridge_ports: "{{ ansible_local.xci.network.xci_interface }}", ip: "{{ host_info[inventory_hostname].VLAN_IP }}/24" }
- - { name: "br-storage", bridge_ports: "{{ ansible_local.xci.network.xci_interface }}.20", ip: "{{ host_info[inventory_hostname].STORAGE_IP }}/22" }
-
- - name: Add postup/postdown scripts on SUSE
- copy:
- src: "network-config-suse"
- dest: "/etc/sysconfig/network/scripts/network-config-suse"
- mode: 0755
-
- - name: Configure routes on SUSE
- template:
- src: "{{ installer_type }}/{{ ansible_os_family | lower }}/suse.routes.j2"
- dest: "/etc/sysconfig/network/ifroute-{{ item.name }}"
- with_items:
- - { name: "br-vlan", gateway: "192.168.122.1", route: "default" }
- - name: restart network service
- service:
- name: network
- state: restarted
- async: 15
- poll: 0
- when: ansible_os_family | lower == "suse"
-
-- block:
- - name: Configure networking on CentOS for interfaces
- template:
- src: "{{ installer_type }}/{{ ansible_os_family | lower }}/interface.ifcfg.j2"
- dest: "/etc/sysconfig/network-scripts/ifcfg-{{ item.name }}"
- with_items:
- - { name: "{{ ansible_local.xci.network.xci_interface }}" , bridge: "br-vlan" }
- - { name: "{{ ansible_local.xci.network.xci_interface }}.10", bridge: "br-mgmt" , vlan_id: 10 }
- - { name: "{{ ansible_local.xci.network.xci_interface }}.20", bridge: "br-storage", vlan_id: 20 }
- - { name: "{{ ansible_local.xci.network.xci_interface }}.30", bridge: "br-vxlan" , vlan_id: 30 }
- - name: Configure networking on CentOS for bridges
- template:
- src: "{{ installer_type }}/{{ ansible_os_family | lower }}/bridge.ifcfg.j2"
- dest: "/etc/sysconfig/network-scripts/ifcfg-{{ item.name }}"
- with_items:
- - { name: "br-vlan" , ip: "{{ host_info[inventory_hostname].VLAN_IP }}", prefix: 24 }
- - { name: "br-mgmt" , ip: "{{ host_info[inventory_hostname].MGMT_IP }}", prefix: 22 }
- - { name: "br-storage", ip: "{{ host_info[inventory_hostname].STORAGE_IP }}", prefix: 22 }
- - { name: "br-vxlan" , ip: "{{ host_info[inventory_hostname].VXLAN_IP }}", prefix: 22 }
- - name: Add default route through br-vlan
- lineinfile:
- path: "/etc/sysconfig/network-scripts/ifcfg-br-vlan"
- line: "GATEWAY=192.168.122.1"
- - name: restart network service
- service:
- name: network
- state: restarted
- async: 15
- poll: 0
- when: ansible_os_family | lower == "redhat"
+- name: "Configure networking on {{ ansible_os_family }}"
+ include_tasks: "network_{{ ansible_os_family | lower }}.yml"
- name: Wait for host to come back to life
local_action:
diff --git a/xci/playbooks/roles/bootstrap-host/tasks/network_debian.yml b/xci/playbooks/roles/bootstrap-host/tasks/network_debian.yml
new file mode 100644
index 00000000..ddca58b0
--- /dev/null
+++ b/xci/playbooks/roles/bootstrap-host/tasks/network_debian.yml
@@ -0,0 +1,58 @@
+---
+# SPDX-license-identifier: Apache-2.0
+##############################################################################
+# Copyright (c) 2018 SUSE LINUX GmbH.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+- name: configure modules
+ lineinfile:
+ dest: /etc/modules
+ state: present
+ create: yes
+ line: "8021q"
+
+- name: add modules
+ modprobe:
+ name: 8021q
+ state: present
+
+- name: ensure interfaces.d folder is empty
+ file:
+ state: "{{ item }}"
+ path: "/etc/network/interfaces.d"
+ with_items:
+ - absent
+ - directory
+
+- name: Ensure /etc/interfaces can source additional files
+ copy:
+ content: |
+ auto lo
+ iface lo inet loopback
+ source /etc/network/interfaces.d/*.cfg
+ dest: "/etc/network/interfaces"
+
+- name: "Configure networking for {{ inventory_hostname }}"
+ template:
+ src: "{{ installer_type }}/debian.interface.j2"
+ dest: "/etc/network/interfaces.d/{{ item.name }}.cfg"
+ with_items:
+ - { name: "{{ ansible_local.xci.network.xci_interface }}" }
+ - { name: "{{ ansible_local.xci.network.xci_interface }}.10", vlan_id: 10 }
+ - { name: "{{ ansible_local.xci.network.xci_interface }}.30", vlan_id: 30 }
+ - { name: "{{ ansible_local.xci.network.xci_interface }}.20", vlan_id: 20 }
+ - { name: "br-mgmt", bridge_ports: "{{ ansible_local.xci.network.xci_interface }}.10", ip: "{{ host_info[inventory_hostname].MGMT_IP }}", prefix: "255.255.252.0" }
+ - { name: "br-vxlan", bridge_ports: "{{ ansible_local.xci.network.xci_interface }}.30", ip: "{{ host_info[inventory_hostname].VXLAN_IP }}", prefix: "255.255.252.0" }
+ - { name: "br-vlan", bridge_ports: "{{ ansible_local.xci.network.xci_interface }}", ip: "{{ host_info[inventory_hostname].VLAN_IP }}", prefix: "255.255.255.0", gateway: "192.168.122.1" }
+ - { name: "br-storage", bridge_ports: "{{ ansible_local.xci.network.xci_interface }}.20", ip: "{{ host_info[inventory_hostname].STORAGE_IP }}", prefix: "255.255.252.0" }
+ loop_control:
+ label: "{{ item.name }}"
+
+- name: restart network service
+ shell: "/sbin/ifconfig {{ ansible_local.xci.network.xci_interface }} 0 && /sbin/ifdown -a && /sbin/ifup -a"
+ async: 15
+ poll: 0
diff --git a/xci/playbooks/roles/bootstrap-host/tasks/network_redhat.yml b/xci/playbooks/roles/bootstrap-host/tasks/network_redhat.yml
new file mode 100644
index 00000000..8c98203a
--- /dev/null
+++ b/xci/playbooks/roles/bootstrap-host/tasks/network_redhat.yml
@@ -0,0 +1,37 @@
+---
+# SPDX-license-identifier: Apache-2.0
+##############################################################################
+# Copyright (c) 2018 SUSE LINUX GmbH.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+- name: "Configure networking on {{ inventory_hostname }}"
+ template:
+ src: "{{ installer_type }}/{{ ansible_os_family | lower }}.ifcfg.j2"
+ dest: "/etc/sysconfig/network-scripts/ifcfg-{{ item.name }}"
+ with_items:
+ - { name: "{{ ansible_local.xci.network.xci_interface }}" , bridge: "br-vlan" }
+ - { name: "{{ ansible_local.xci.network.xci_interface }}.10", bridge: "br-mgmt" , vlan_id: 10 }
+ - { name: "{{ ansible_local.xci.network.xci_interface }}.20", bridge: "br-storage", vlan_id: 20 }
+ - { name: "{{ ansible_local.xci.network.xci_interface }}.30", bridge: "br-vxlan" , vlan_id: 30 }
+ - { name: "br-vlan" , ip: "{{ host_info[inventory_hostname].VLAN_IP }}", prefix: 24 }
+ - { name: "br-mgmt" , ip: "{{ host_info[inventory_hostname].MGMT_IP }}", prefix: 22 }
+ - { name: "br-storage", ip: "{{ host_info[inventory_hostname].STORAGE_IP }}", prefix: 22 }
+ - { name: "br-vxlan" , ip: "{{ host_info[inventory_hostname].VXLAN_IP }}", prefix: 22 }
+ loop_control:
+ label: "{{ item.name }}"
+
+- name: Add default route through br-vlan
+ lineinfile:
+ path: "/etc/sysconfig/network-scripts/ifcfg-br-vlan"
+ line: "GATEWAY=192.168.122.1"
+
+- name: restart network service
+ service:
+ name: network
+ state: restarted
+ async: 15
+ poll: 0
diff --git a/xci/playbooks/roles/bootstrap-host/tasks/network_suse.yml b/xci/playbooks/roles/bootstrap-host/tasks/network_suse.yml
new file mode 100644
index 00000000..6ad13169
--- /dev/null
+++ b/xci/playbooks/roles/bootstrap-host/tasks/network_suse.yml
@@ -0,0 +1,45 @@
+---
+# SPDX-license-identifier: Apache-2.0
+##############################################################################
+# Copyright (c) 2018 SUSE LINUX GmbH.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+- name: "Configure networking on {{ inventory_hostname }}"
+ template:
+ src: "{{ installer_type }}/{{ ansible_os_family | lower }}.interface.j2"
+ dest: "/etc/sysconfig/network/ifcfg-{{ item.name }}"
+ with_items:
+ - { name: "{{ ansible_local.xci.network.xci_interface }}" }
+ - { name: "{{ ansible_local.xci.network.xci_interface }}.10", vlan_id: 10 }
+ - { name: "{{ ansible_local.xci.network.xci_interface }}.30", vlan_id: 30 }
+ - { name: "{{ ansible_local.xci.network.xci_interface }}.20", vlan_id: 20 }
+ - { name: "br-mgmt", bridge_ports: "{{ ansible_local.xci.network.xci_interface }}.10", ip: "{{ host_info[inventory_hostname].MGMT_IP }}/22" }
+ - { name: "br-vxlan", bridge_ports: "{{ ansible_local.xci.network.xci_interface }}.30", ip: "{{ host_info[inventory_hostname].VXLAN_IP }}/22" }
+ - { name: "br-vlan", bridge_ports: "{{ ansible_local.xci.network.xci_interface }}", ip: "{{ host_info[inventory_hostname].VLAN_IP }}/24" }
+ - { name: "br-storage", bridge_ports: "{{ ansible_local.xci.network.xci_interface }}.20", ip: "{{ host_info[inventory_hostname].STORAGE_IP }}/22" }
+ loop_control:
+ label: "{{ item.name }}"
+
+- name: Add postup/postdown scripts on SUSE
+ copy:
+ src: "network-config-suse"
+ dest: "/etc/sysconfig/network/scripts/network-config-suse"
+ mode: 0755
+
+- name: Configure routes on SUSE
+ template:
+ src: "{{ installer_type }}/{{ ansible_os_family | lower }}.routes.j2"
+ dest: "/etc/sysconfig/network/ifroute-{{ item.name }}"
+ with_items:
+ - { name: "br-vlan", gateway: "192.168.122.1", route: "default" }
+
+- name: restart network service
+ service:
+ name: network
+ state: restarted
+ async: 15
+ poll: 0
diff --git a/xci/playbooks/roles/bootstrap-host/templates/osa/debian.interface.j2 b/xci/playbooks/roles/bootstrap-host/templates/osa/debian.interface.j2
new file mode 100644
index 00000000..56db509b
--- /dev/null
+++ b/xci/playbooks/roles/bootstrap-host/templates/osa/debian.interface.j2
@@ -0,0 +1,38 @@
+# {{ ansible_managed }}
+
+# Physical interface
+{% if item.bridge_ports is not defined %}
+auto {{ item.name }}
+iface {{ item.name }} inet manual
+{% if item.vlan_id is defined %}
+ vlan-raw-device {{ item.name|replace('.' ~ item.vlan_id, '') }}
+{% endif %}
+
+{% else %}
+auto {{ item.name }}
+iface {{ item.name }} inet static
+ bridge_stp off
+ bridge_waitport 0
+ bridge_fd 0
+ bridge_ports {{ item.bridge_ports }}
+{% if item.name == 'br-vlan' %}
+ # Create veth pair, don't bomb if already exists
+ pre-up ip link add br-vlan-veth type veth peer name eth12 || true
+ # Set both ends UP
+ pre-up ip link set br-vlan-veth up
+ pre-up ip link set eth12 up
+ # Delete veth pair on DOWN
+ post-down ip link del br-vlan-veth || true
+ bridge_ports br-vlan-veth
+{% endif %}
+{% if item.ip is defined %}
+ address {{ item.ip }}
+{% endif %}
+{% if item.prefix is defined %}
+ netmask {{ item.prefix }}
+{% endif %}
+{% if item.gateway is defined %}
+ gateway {{ item.gateway }}
+{% endif %}
+
+{% endif %}
diff --git a/xci/playbooks/roles/bootstrap-host/templates/osa/debian/compute00.interface.j2 b/xci/playbooks/roles/bootstrap-host/templates/osa/debian/compute00.interface.j2
deleted file mode 100644
index 2da12f20..00000000
--- a/xci/playbooks/roles/bootstrap-host/templates/osa/debian/compute00.interface.j2
+++ /dev/null
@@ -1,75 +0,0 @@
-# {{ ansible_managed }}
-
-# The loopback network interface
-auto lo
-iface lo inet loopback
-
-# Physical interface
-auto {{ ansible_default_ipv4.interface }}
-iface {{ ansible_default_ipv4.interface }} inet manual
-
-# Container/Host management VLAN interface
-auto {{ ansible_default_ipv4.interface }}.10
-iface {{ ansible_default_ipv4.interface }}.10 inet manual
- vlan-raw-device {{ ansible_default_ipv4.interface }}
-
-# OpenStack Networking VXLAN (tunnel/overlay) VLAN interface
-auto {{ ansible_default_ipv4.interface }}.30
-iface {{ ansible_default_ipv4.interface }}.30 inet manual
- vlan-raw-device {{ ansible_default_ipv4.interface }}
-
-# Storage network VLAN interface
-auto {{ ansible_default_ipv4.interface }}.20
-iface {{ ansible_default_ipv4.interface }}.20 inet manual
- vlan-raw-device {{ ansible_default_ipv4.interface }}
-
-# Container/Host management bridge
-auto br-mgmt
-iface br-mgmt inet static
- bridge_stp off
- bridge_waitport 0
- bridge_fd 0
- bridge_ports {{ ansible_default_ipv4.interface }}.10
- address {{host_info[inventory_hostname].MGMT_IP}}
- netmask 255.255.252.0
-
-# compute1 VXLAN (tunnel/overlay) bridge config
-auto br-vxlan
-iface br-vxlan inet static
- bridge_stp off
- bridge_waitport 0
- bridge_fd 0
- bridge_ports {{ ansible_default_ipv4.interface }}.30
- address {{host_info[inventory_hostname].VXLAN_IP}}
- netmask 255.255.252.0
-
-# OpenStack Networking VLAN bridge
-auto br-vlan
-iface br-vlan inet static
- bridge_stp off
- bridge_waitport 0
- bridge_fd 0
- bridge_ports {{ ansible_default_ipv4.interface }}
- address {{host_info[inventory_hostname].VLAN_IP}}
- netmask 255.255.255.0
- gateway 192.168.122.1
- dns-nameserver 8.8.8.8 8.8.4.4
- offload-sg off
- # Create veth pair, don't bomb if already exists
- pre-up ip link add br-vlan-veth type veth peer name eth12 || true
- # Set both ends UP
- pre-up ip link set br-vlan-veth up
- pre-up ip link set eth12 up
- # Delete veth pair on DOWN
- post-down ip link del br-vlan-veth || true
- bridge_ports br-vlan-veth
-
-# OpenStack Storage bridge
-auto br-storage
-iface br-storage inet static
- bridge_stp off
- bridge_waitport 0
- bridge_fd 0
- bridge_ports {{ ansible_default_ipv4.interface }}.20
- address {{host_info[inventory_hostname].STORAGE_IP}}
- netmask 255.255.252.0
diff --git a/xci/playbooks/roles/bootstrap-host/templates/osa/debian/compute01.interface.j2 b/xci/playbooks/roles/bootstrap-host/templates/osa/debian/compute01.interface.j2
deleted file mode 120000
index a74df1c2..00000000
--- a/xci/playbooks/roles/bootstrap-host/templates/osa/debian/compute01.interface.j2
+++ /dev/null
@@ -1 +0,0 @@
-compute00.interface.j2 \ No newline at end of file
diff --git a/xci/playbooks/roles/bootstrap-host/templates/osa/debian/controller00.interface.j2 b/xci/playbooks/roles/bootstrap-host/templates/osa/debian/controller00.interface.j2
deleted file mode 100644
index c540f66e..00000000
--- a/xci/playbooks/roles/bootstrap-host/templates/osa/debian/controller00.interface.j2
+++ /dev/null
@@ -1,74 +0,0 @@
-# {{ ansible_managed }}
-
-# The loopback network interface
-auto lo
-iface lo inet loopback
-
-# Physical interface
-auto {{ ansible_default_ipv4.interface }}
-iface {{ ansible_default_ipv4.interface }} inet manual
-
-# Container/Host management VLAN interface
-auto {{ ansible_default_ipv4.interface }}.10
-iface {{ ansible_default_ipv4.interface }}.10 inet manual
- vlan-raw-device {{ ansible_default_ipv4.interface }}
-
-# OpenStack Networking VXLAN (tunnel/overlay) VLAN interface
-auto {{ ansible_default_ipv4.interface }}.30
-iface {{ ansible_default_ipv4.interface }}.30 inet manual
- vlan-raw-device {{ ansible_default_ipv4.interface }}
-
-# Storage network VLAN interface (optional)
-auto {{ ansible_default_ipv4.interface }}.20
-iface {{ ansible_default_ipv4.interface }}.20 inet manual
- vlan-raw-device {{ ansible_default_ipv4.interface }}
-
-# Container/Host management bridge
-auto br-mgmt
-iface br-mgmt inet static
- bridge_stp off
- bridge_waitport 0
- bridge_fd 0
- bridge_ports {{ ansible_default_ipv4.interface }}.10
- address {{host_info[inventory_hostname].MGMT_IP}}
- netmask 255.255.252.0
-
-# OpenStack Networking VXLAN (tunnel/overlay) bridge
-auto br-vxlan
-iface br-vxlan inet static
- bridge_stp off
- bridge_waitport 0
- bridge_fd 0
- bridge_ports {{ ansible_default_ipv4.interface }}.30
- address {{host_info[inventory_hostname].VXLAN_IP}}
- netmask 255.255.252.0
-
-# OpenStack Networking VLAN bridge
-auto br-vlan
-iface br-vlan inet static
- bridge_stp off
- bridge_waitport 0
- bridge_fd 0
- bridge_ports {{ ansible_default_ipv4.interface }}
- address {{host_info[inventory_hostname].VLAN_IP}}
- netmask 255.255.255.0
- gateway 192.168.122.1
- dns-nameserver 8.8.8.8 8.8.4.4
- # Create veth pair, don't bomb if already exists
- pre-up ip link add br-vlan-veth type veth peer name eth12 || true
- # Set both ends UP
- pre-up ip link set br-vlan-veth up
- pre-up ip link set eth12 up
- # Delete veth pair on DOWN
- post-down ip link del br-vlan-veth || true
- bridge_ports br-vlan-veth
-
-# OpenStack Storage bridge
-auto br-storage
-iface br-storage inet static
- bridge_stp off
- bridge_waitport 0
- bridge_fd 0
- bridge_ports {{ ansible_default_ipv4.interface }}.20
- address {{host_info[inventory_hostname].STORAGE_IP}}
- netmask 255.255.252.0
diff --git a/xci/playbooks/roles/bootstrap-host/templates/osa/debian/controller01.interface.j2 b/xci/playbooks/roles/bootstrap-host/templates/osa/debian/controller01.interface.j2
deleted file mode 120000
index e835d7ca..00000000
--- a/xci/playbooks/roles/bootstrap-host/templates/osa/debian/controller01.interface.j2
+++ /dev/null
@@ -1 +0,0 @@
-controller00.interface.j2 \ No newline at end of file
diff --git a/xci/playbooks/roles/bootstrap-host/templates/osa/debian/controller02.interface.j2 b/xci/playbooks/roles/bootstrap-host/templates/osa/debian/controller02.interface.j2
deleted file mode 120000
index e835d7ca..00000000
--- a/xci/playbooks/roles/bootstrap-host/templates/osa/debian/controller02.interface.j2
+++ /dev/null
@@ -1 +0,0 @@
-controller00.interface.j2 \ No newline at end of file
diff --git a/xci/playbooks/roles/bootstrap-host/templates/osa/debian/opnfv.interface.j2 b/xci/playbooks/roles/bootstrap-host/templates/osa/debian/opnfv.interface.j2
deleted file mode 100644
index 03f81dbb..00000000
--- a/xci/playbooks/roles/bootstrap-host/templates/osa/debian/opnfv.interface.j2
+++ /dev/null
@@ -1,66 +0,0 @@
-# {{ ansible_managed }}
-
-# The loopback network interface
-auto lo
-iface lo inet loopback
-
-# Physical interface
-auto {{ ansible_default_ipv4.interface }}
-iface {{ ansible_default_ipv4.interface }} inet manual
-
-# Container/Host management VLAN interface
-auto {{ ansible_default_ipv4.interface }}.10
-iface {{ ansible_default_ipv4.interface }}.10 inet manual
- vlan-raw-device {{ ansible_default_ipv4.interface }}
-
-# OpenStack Networking VXLAN (tunnel/overlay) VLAN interface
-auto {{ ansible_default_ipv4.interface }}.30
-iface {{ ansible_default_ipv4.interface }}.30 inet manual
- vlan-raw-device {{ ansible_default_ipv4.interface }}
-
-# Storage network VLAN interface (optional)
-auto {{ ansible_default_ipv4.interface }}.20
-iface {{ ansible_default_ipv4.interface }}.20 inet manual
- vlan-raw-device {{ ansible_default_ipv4.interface }}
-
-# Container/Host management bridge
-auto br-mgmt
-iface br-mgmt inet static
- bridge_stp off
- bridge_waitport 0
- bridge_fd 0
- bridge_ports {{ ansible_default_ipv4.interface }}.10
- address {{host_info[inventory_hostname].MGMT_IP}}
- netmask 255.255.252.0
-
-# OpenStack Networking VXLAN (tunnel/overlay) bridge
-auto br-vxlan
-iface br-vxlan inet static
- bridge_stp off
- bridge_waitport 0
- bridge_fd 0
- bridge_ports {{ ansible_default_ipv4.interface }}.30
- address {{ host_info[inventory_hostname].VXLAN_IP }}
- netmask 255.255.252.0
-
-# OpenStack Networking VLAN bridge
-auto br-vlan
-iface br-vlan inet static
- bridge_stp off
- bridge_waitport 0
- bridge_fd 0
- bridge_ports {{ ansible_default_ipv4.interface }}
- address {{host_info[inventory_hostname].VLAN_IP}}
- netmask 255.255.255.0
- gateway 192.168.122.1
- dns-nameserver 8.8.8.8 8.8.4.4
-
-# OpenStack Storage bridge
-auto br-storage
-iface br-storage inet static
- bridge_stp off
- bridge_waitport 0
- bridge_fd 0
- bridge_ports {{ ansible_default_ipv4.interface }}.20
- address {{host_info[inventory_hostname].STORAGE_IP}}
- netmask 255.255.252.0
diff --git a/xci/playbooks/roles/bootstrap-host/templates/osa/redhat.interface.j2 b/xci/playbooks/roles/bootstrap-host/templates/osa/redhat.interface.j2
new file mode 100644
index 00000000..d3364385
--- /dev/null
+++ b/xci/playbooks/roles/bootstrap-host/templates/osa/redhat.interface.j2
@@ -0,0 +1,22 @@
+DEVICE={{ item.name }}
+NM_CONTROLLED=no
+ONBOOT=yes
+BOOTPROTO=none
+{% if item.vlan_id is defined %}
+VLAN=yes
+ETHERDEVICE={{ ansible_local.xci.network.xci_interface }}
+VLAN_ID={{ item.vlan_id }}
+{% endif %}
+{% if item.bridge is not defined %}
+BRIDGE={{ item.bridge }}
+{% else %}
+TYPE=Bridge
+DELAY=0
+STP=off
+{% endif %}
+{% if item.ip is defined %}
+IPADDR={{ item.ip }}
+{% endif %}
+{% if item.prefix is defined %}
+PREFIX={{ item.prefix }}
+{% endif %}
diff --git a/xci/playbooks/roles/bootstrap-host/templates/osa/redhat/bridge.ifcfg.j2 b/xci/playbooks/roles/bootstrap-host/templates/osa/redhat/bridge.ifcfg.j2
deleted file mode 100644
index 06b5f177..00000000
--- a/xci/playbooks/roles/bootstrap-host/templates/osa/redhat/bridge.ifcfg.j2
+++ /dev/null
@@ -1,9 +0,0 @@
-DEVICE={{ item.name }}
-NM_CONTROLLED=no
-IPADDR={{ item.ip }}
-PREFIX={{ item.prefix }}
-ONBOOT=yes
-BOOTPROTO=none
-TYPE=Bridge
-DELAY=0
-STP=off
diff --git a/xci/playbooks/roles/bootstrap-host/templates/osa/redhat/interface.ifcfg.j2 b/xci/playbooks/roles/bootstrap-host/templates/osa/redhat/interface.ifcfg.j2
deleted file mode 100644
index a97ad0cf..00000000
--- a/xci/playbooks/roles/bootstrap-host/templates/osa/redhat/interface.ifcfg.j2
+++ /dev/null
@@ -1,10 +0,0 @@
-DEVICE={{ item.name }}
-NM_CONTROLLED=no
-ONBOOT=yes
-BOOTPROTO=none
-{% if item.vlan_id is defined %}
-VLAN=yes
-ETHERDEVICE={{ ansible_default_ipv4.interface }}
-VLAN_ID={{ item.vlan_id }}
-{% endif %}
-BRIDGE={{ item.bridge }}
diff --git a/xci/playbooks/roles/bootstrap-host/templates/osa/suse/suse.interface.j2 b/xci/playbooks/roles/bootstrap-host/templates/osa/suse.interface.j2
index 27b01eb4..27b01eb4 100644
--- a/xci/playbooks/roles/bootstrap-host/templates/osa/suse/suse.interface.j2
+++ b/xci/playbooks/roles/bootstrap-host/templates/osa/suse.interface.j2
diff --git a/xci/playbooks/roles/bootstrap-host/templates/osa/suse/suse.routes.j2 b/xci/playbooks/roles/bootstrap-host/templates/osa/suse.routes.j2
index 7c868447..7c868447 100644
--- a/xci/playbooks/roles/bootstrap-host/templates/osa/suse/suse.routes.j2
+++ b/xci/playbooks/roles/bootstrap-host/templates/osa/suse.routes.j2