From d26cd5fcee626d001e9312460e38725d72fe53ef Mon Sep 17 00:00:00 2001
From: Markos Chandras <mchandras@suse.de>
Date: Fri, 9 Mar 2018 14:15:16 +0000
Subject: bifrost: Move DIB configuration variables to bifrost

The DIB variables only make sense on bifrost so they should live in the
bifrost provision script.

Change-Id: I05baca7b9c6889a0d401a9288998991324d270af
Signed-off-by: Markos Chandras <mchandras@suse.de>
---
 bifrost/scripts/bifrost-provision.sh | 20 ++++++++++++++++++++
 xci/xci-deploy.sh                    | 19 -------------------
 2 files changed, 20 insertions(+), 19 deletions(-)

diff --git a/bifrost/scripts/bifrost-provision.sh b/bifrost/scripts/bifrost-provision.sh
index dccb3231..726a4da4 100755
--- a/bifrost/scripts/bifrost-provision.sh
+++ b/bifrost/scripts/bifrost-provision.sh
@@ -77,6 +77,26 @@ export DIB_OS_PACKAGES=${DIB_OS_PACKAGES:-"vlan,vim,less,bridge-utils,language-p
 # Additional dib elements
 export EXTRA_DIB_ELEMENTS=${EXTRA_DIB_ELEMENTS:-"openssh-server"}
 
+# dib configuration
+case ${XCI_DISTRO,,} in
+    # These should ideally match the CI jobs
+    ubuntu)
+        export DIB_OS_RELEASE="${DIB_OS_RELEASE:-xenial}"
+        export DIB_OS_ELEMENT="${DIB_OS_ELEMENT:-ubuntu-minimal}"
+        export DIB_OS_PACKAGES="${DIB_OS_PACKAGES:-vlan,vim,less,bridge-utils,language-pack-en,iputils-ping,rsyslog,curl,iptables}"
+        ;;
+    centos)
+        export DIB_OS_RELEASE="${DIB_OS_RELEASE:-7}"
+        export DIB_OS_ELEMENT="${DIB_OS_ELEMENT:-centos-minimal}"
+        export DIB_OS_PACKAGES="${DIB_OS_PACKAGES:-vim,less,bridge-utils,iputils,rsyslog,curl,iptables}"
+        ;;
+    opensuse)
+        export DIB_OS_RELEASE="${DIB_OS_RELEASE:-42.3}"
+        export DIB_OS_ELEMENT="${DIB_OS_ELEMENT:-opensuse-minimal}"
+        export DIB_OS_PACKAGES="${DIB_OS_PACKAGES:-vim,less,bridge-utils,iputils,rsyslog,curl,iptables}"
+        ;;
+esac
+
 # Copy the OS images if found
 if [[ -e ${XCI_PATH}/deployment_image.qcow2 ]]; then
 	sudo mkdir -p /httpboot
diff --git a/xci/xci-deploy.sh b/xci/xci-deploy.sh
index 1eeaf3b2..c336be15 100755
--- a/xci/xci-deploy.sh
+++ b/xci/xci-deploy.sh
@@ -103,25 +103,6 @@ echo "-------------------------------------------------------------------------"
 bash files/install-ansible.sh
 echo "-------------------------------------------------------------------------"
 
-case ${XCI_DISTRO,,} in
-    # These should ideally match the CI jobs
-    ubuntu)
-        export DIB_OS_RELEASE="${DIB_OS_RELEASE:-xenial}"
-        export DIB_OS_ELEMENT="${DIB_OS_ELEMENT:-ubuntu-minimal}"
-        export DIB_OS_PACKAGES="${DIB_OS_PACKAGES:-vlan,vim,less,bridge-utils,language-pack-en,iputils-ping,rsyslog,curl,iptables}"
-        ;;
-    centos)
-        export DIB_OS_RELEASE="${DIB_OS_RELEASE:-7}"
-        export DIB_OS_ELEMENT="${DIB_OS_ELEMENT:-centos-minimal}"
-        export DIB_OS_PACKAGES="${DIB_OS_PACKAGES:-vim,less,bridge-utils,iputils,rsyslog,curl,iptables}"
-        ;;
-    opensuse)
-        export DIB_OS_RELEASE="${DIB_OS_RELEASE:-42.3}"
-        export DIB_OS_ELEMENT="${DIB_OS_ELEMENT:-opensuse-minimal}"
-        export DIB_OS_PACKAGES="${DIB_OS_PACKAGES:-vim,less,bridge-utils,iputils,rsyslog,curl,iptables}"
-        ;;
-esac
-
 # Clone OPNFV scenario repositories
 #-------------------------------------------------------------------------------
 # This playbook
-- 
cgit