From 0697a3206ae2ac5672b65343b3bb79819162352d Mon Sep 17 00:00:00 2001 From: Denys Havrysh Date: Fri, 25 Nov 2016 11:38:32 +0200 Subject: [PATCH] Install dependencies if Master/Minion custom configuration specified --- bootstrap-salt.sh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index da5d44d..cd8120a 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -342,12 +342,12 @@ __usage() { repo.saltstack.com. The option passed with -R replaces the "repo.saltstack.com". If -R is passed, -r is also set. Currently only works on CentOS/RHEL based distributions. - -J Replace the Master config file with data passed in as a json string. If + -J Replace the Master config file with data passed in as a JSON string. If a Master config file is found, a reasonable effort will be made to save the file with a ".bak" extension. If used in conjunction with -C or -F, no ".bak" file will be created as either of those options will force a complete overwrite of the file. - -j Replace the Minion config file with data passed in as a json string. If + -j Replace the Minion config file with data passed in as a JSON string. If a Minion config file is found, a reasonable effort will be made to save the file with a ".bak" extension. If used in conjunction with -C or -F, no ".bak" file will be created as either of those options will force @@ -6370,6 +6370,16 @@ if [ "$_CUSTOM_MASTER_CONFIG" != "null" ] || [ "$_CUSTOM_MINION_CONFIG" != "null if [ "$_TEMP_CONFIG_DIR" = "null" ]; then _TEMP_CONFIG_DIR="$_SALT_ETC_DIR" fi + + if [ "$_CONFIG_ONLY" -eq $BS_TRUE ]; then + # Execute function to satisfy dependencies for configuration step + echoinfo "Running ${DEPS_INSTALL_FUNC}()" + $DEPS_INSTALL_FUNC + if [ $? -ne 0 ]; then + echoerror "Failed to run ${DEPS_INSTALL_FUNC}()!!!" + exit 1 + fi + fi fi # Configure Salt