summaryrefslogtreecommitdiffstats
path: root/mcp
diff options
context:
space:
mode:
Diffstat (limited to 'mcp')
-rwxr-xr-xmcp/config/states/virtual_control_plane12
1 files changed, 10 insertions, 2 deletions
diff --git a/mcp/config/states/virtual_control_plane b/mcp/config/states/virtual_control_plane
index 9ebf4bf69..43d152023 100755
--- a/mcp/config/states/virtual_control_plane
+++ b/mcp/config/states/virtual_control_plane
@@ -13,9 +13,17 @@ CI_DEBUG=${CI_DEBUG:-0}; [[ "${CI_DEBUG}" =~ (false|0) ]] || set -x
source "$(dirname "${BASH_SOURCE[0]}")/../../scripts/lib.sh"
# KVM, compute node prereqs (libvirt first), VCP deployment
-salt -C 'kvm* or cmp*' file.line \
- /usr/lib/python2.7/dist-packages/salt/modules/debian_ip.py \
+salt -C 'kvm* or cmp*' cmd.run 'rm -f /etc/network/interfaces.d/*.cfg'
+
+# patch the networking module for Debian based distros
+debian_ip_source=/usr/lib/python2.7/dist-packages/salt/modules/debian_ip.py
+salt -C 'kvm* or cmp*' file.line $debian_ip_source \
content='iface = iface.lower()' mode='delete'
+
+salt -C 'kvm* or cmp*' file.replace $debian_ip_source \
+ pattern="^\s{8}__salt__\['pkg.install'\]\('vlan'\)" \
+ repl="\n if not __salt__['pkg.version']('vlan'):\n __salt__['pkg.install']('vlan')"
+
salt -C 'kvm*' pkg.install bridge-utils
salt -C 'kvm*' state.apply linux.network
salt -C 'cmp*' state.apply linux.system