From 7dd14e002128b5e6fe5302e6f7fe8620682a7d53 Mon Sep 17 00:00:00 2001 From: Markos Chandras Date: Tue, 13 Mar 2018 10:30:16 +0000 Subject: xci: Merge configure-network and syncronize-time roles Those roles were too small and only used as part of the host bootstrapping process. As such, we merge them into a common 'bootstrap-host' role which can be used to prepare the hosts after the initial deployment Change-Id: Ifc84cf40b98ced91b31aae699dc28e9642380550 Signed-off-by: Markos Chandras --- .../roles/bootstrap-host/files/network-config-suse | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 xci/playbooks/roles/bootstrap-host/files/network-config-suse (limited to 'xci/playbooks/roles/bootstrap-host/files') diff --git a/xci/playbooks/roles/bootstrap-host/files/network-config-suse b/xci/playbooks/roles/bootstrap-host/files/network-config-suse new file mode 100755 index 00000000..02cdd998 --- /dev/null +++ b/xci/playbooks/roles/bootstrap-host/files/network-config-suse @@ -0,0 +1,17 @@ +#!/bin/bash + +INTERFACE=$1 +ACTION=$4 + +if [[ $INTERFACE == "br-vlan" ]]; then + if [[ $ACTION == "pre-up" ]]; then + ip link add br-vlan-veth type veth peer name eth12 || true + ip link set br-vlan-veth up + ip link set eth12 up + brctl addif br-vlan br-vlan-veth + else + brctl delif br-vlan br-vlan-veth + ip link del br-vlan-veth || true + fi +fi + -- cgit 1.2.3-korg