summaryrefslogtreecommitdiffstats
path: root/xci/playbooks/roles/bootstrap-host/templates
diff options
context:
space:
mode:
Diffstat (limited to 'xci/playbooks/roles/bootstrap-host/templates')
-rw-r--r--xci/playbooks/roles/bootstrap-host/templates/debian/compute00.interface.j275
l---------xci/playbooks/roles/bootstrap-host/templates/debian/compute01.interface.j21
-rw-r--r--xci/playbooks/roles/bootstrap-host/templates/debian/controller00.interface.j274
l---------xci/playbooks/roles/bootstrap-host/templates/debian/controller01.interface.j21
l---------xci/playbooks/roles/bootstrap-host/templates/debian/controller02.interface.j21
-rw-r--r--xci/playbooks/roles/bootstrap-host/templates/debian/opnfv.interface.j266
-rw-r--r--xci/playbooks/roles/bootstrap-host/templates/osa/debian.interface.j236
-rw-r--r--xci/playbooks/roles/bootstrap-host/templates/osa/redhat.interface.j219
-rw-r--r--xci/playbooks/roles/bootstrap-host/templates/osa/suse.interface.j2 (renamed from xci/playbooks/roles/bootstrap-host/templates/suse/suse.interface.j2)4
-rw-r--r--xci/playbooks/roles/bootstrap-host/templates/osa/suse.routes.j21
-rw-r--r--xci/playbooks/roles/bootstrap-host/templates/redhat/bridge.ifcfg.j29
-rw-r--r--xci/playbooks/roles/bootstrap-host/templates/redhat/interface.ifcfg.j210
-rw-r--r--xci/playbooks/roles/bootstrap-host/templates/suse/suse.routes.j21
13 files changed, 58 insertions, 240 deletions
diff --git a/xci/playbooks/roles/bootstrap-host/templates/debian/compute00.interface.j2 b/xci/playbooks/roles/bootstrap-host/templates/debian/compute00.interface.j2
deleted file mode 100644
index 2da12f20..00000000
--- a/xci/playbooks/roles/bootstrap-host/templates/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/debian/compute01.interface.j2 b/xci/playbooks/roles/bootstrap-host/templates/debian/compute01.interface.j2
deleted file mode 120000
index a74df1c2..00000000
--- a/xci/playbooks/roles/bootstrap-host/templates/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/debian/controller00.interface.j2 b/xci/playbooks/roles/bootstrap-host/templates/debian/controller00.interface.j2
deleted file mode 100644
index c540f66e..00000000
--- a/xci/playbooks/roles/bootstrap-host/templates/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/debian/controller01.interface.j2 b/xci/playbooks/roles/bootstrap-host/templates/debian/controller01.interface.j2
deleted file mode 120000
index e835d7ca..00000000
--- a/xci/playbooks/roles/bootstrap-host/templates/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/debian/controller02.interface.j2 b/xci/playbooks/roles/bootstrap-host/templates/debian/controller02.interface.j2
deleted file mode 120000
index e835d7ca..00000000
--- a/xci/playbooks/roles/bootstrap-host/templates/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/debian/opnfv.interface.j2 b/xci/playbooks/roles/bootstrap-host/templates/debian/opnfv.interface.j2
deleted file mode 100644
index 03f81dbb..00000000
--- a/xci/playbooks/roles/bootstrap-host/templates/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/debian.interface.j2 b/xci/playbooks/roles/bootstrap-host/templates/osa/debian.interface.j2
new file mode 100644
index 00000000..3eddce45
--- /dev/null
+++ b/xci/playbooks/roles/bootstrap-host/templates/osa/debian.interface.j2
@@ -0,0 +1,36 @@
+# {{ 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.network is defined %}
+ address {{ item.network.address | ipaddr('address') }}
+ netmask {{ item.network.address | ipaddr('netmask') }}
+{% endif %}
+{% if item.network is defined and item.network.gateway is defined %}
+ gateway {{ item.network.gateway | ipaddr('address') }}
+{% endif %}
+
+{% endif %}
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..fa957764
--- /dev/null
+++ b/xci/playbooks/roles/bootstrap-host/templates/osa/redhat.interface.j2
@@ -0,0 +1,19 @@
+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.network is defined %}
+IPADDR={{ item.network.address }}
+{% endif %}
diff --git a/xci/playbooks/roles/bootstrap-host/templates/suse/suse.interface.j2 b/xci/playbooks/roles/bootstrap-host/templates/osa/suse.interface.j2
index 27b01eb4..70811a09 100644
--- a/xci/playbooks/roles/bootstrap-host/templates/suse/suse.interface.j2
+++ b/xci/playbooks/roles/bootstrap-host/templates/osa/suse.interface.j2
@@ -10,8 +10,8 @@ BRIDGE_FORWARDDELAY='0'
BRIDGE_STP=off
BRIDGE_PORTS={{ item.bridge_ports }}
{% endif %}
-{% if item.ip is defined %}
-IPADDR={{ item.ip }}
+{% if item.network is defined %}
+IPADDR={{ item.network.address }}
{% endif %}
PRE_UP_SCRIPT="compat:suse:network-config-suse"
POST_DOWN_SCRIPT="compat:suse:network-config-suse"
diff --git a/xci/playbooks/roles/bootstrap-host/templates/osa/suse.routes.j2 b/xci/playbooks/roles/bootstrap-host/templates/osa/suse.routes.j2
new file mode 100644
index 00000000..93941fad
--- /dev/null
+++ b/xci/playbooks/roles/bootstrap-host/templates/osa/suse.routes.j2
@@ -0,0 +1 @@
+{{ item.route }} {{ item.gateway | ipaddr('address') }}
diff --git a/xci/playbooks/roles/bootstrap-host/templates/redhat/bridge.ifcfg.j2 b/xci/playbooks/roles/bootstrap-host/templates/redhat/bridge.ifcfg.j2
deleted file mode 100644
index 06b5f177..00000000
--- a/xci/playbooks/roles/bootstrap-host/templates/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/redhat/interface.ifcfg.j2 b/xci/playbooks/roles/bootstrap-host/templates/redhat/interface.ifcfg.j2
deleted file mode 100644
index a97ad0cf..00000000
--- a/xci/playbooks/roles/bootstrap-host/templates/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/suse/suse.routes.j2 b/xci/playbooks/roles/bootstrap-host/templates/suse/suse.routes.j2
deleted file mode 100644
index 7c868447..00000000
--- a/xci/playbooks/roles/bootstrap-host/templates/suse/suse.routes.j2
+++ /dev/null
@@ -1 +0,0 @@
-{{ item.route }} {{ item.gateway }}