Add possibility to install all formulas
* allow to run apt-get install salt-formula-*
* Add new flag EXTRA_FORMULAS_PKG_ALL to do it.
Moving logic to 'EXTRA_FORMULAS="*"' spawns unpredictable issues
Safer to use new variable for such purposes.
Change-Id: Id387847958ea82a1b835e838ac0da03513ef1fb6
Related-Bug: PROD-23127 (PROD:23127)
diff --git a/bootstrap.sh b/bootstrap.sh
index 91ab96a..c59db0b 100755
--- a/bootstrap.sh
+++ b/bootstrap.sh
@@ -70,6 +70,10 @@
declare -a FORMULAS_SALT_MASTER=(reclass salt git openssh linux $(echo "${FORMULAS_SALT_MASTER}"))
export FORMULAS_SALT_MASTER
+
+# Install 'salt-formula-*'. Works only with FORMULAS_SOURCE==pkg
+export EXTRA_FORMULAS_PKG_ALL=${EXTRA_FORMULAS_PKG_ALL:-False}
+
# system / host
export HOSTNAME=${HOSTNAME:-`hostname -s`}
export HOSTNAME=${HOSTNAME//.*/}
@@ -533,7 +537,7 @@
echo "Configuring necessary formulas ..."
[ ! -d ${RECLASS_ROOT}/classes/service ] && mkdir -p ${RECLASS_ROOT}/classes/service
- if [[ "${FORMULAS_SALT_MASTER}" =~ '*' ]]; then
+ if [[ ${EXTRA_FORMULAS_PKG_ALL} =~ ^(True|true|1|yes)$ ]]; then
install_salt_formula_pkg_all
return
fi