From 0f636544eb11851fd2c42e874563f5c29194f870 Mon Sep 17 00:00:00 2001 From: "Gareth J. Greenaway" Date: Thu, 13 Jul 2023 10:17:33 -0700 Subject: [PATCH] moving the logic for quickstart down to ensure install type and install revision are set correctly for quickstart. --- bootstrap-salt.sh | 40 +++++++++++++++++++++++++--------------- kitchen.yml | 4 ++++ 2 files changed, 29 insertions(+), 15 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 432054c..2897276 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -603,21 +603,6 @@ if [ "$#" -gt 0 ];then shift fi -# Doing a quick start, so install master -# set master address to 127.0.0.1 -if [ "$_QUICK_START" -eq "$BS_TRUE" ]; then - # make sure we're installing the master - _INSTALL_MASTER=$BS_TRUE - # override incase install minion - # is set to false - _INSTALL_MINION=$BS_TRUE - # Set master address to loopback IP - _SALT_MASTER_ADDRESS="127.0.0.1" - # Auto accept the minion key - # when the install is done. - _AUTO_ACCEPT_MINION_KEYS=$BS_TRUE -fi - # Check installation type if [ "$(echo "$ITYPE" | grep -E '(stable|testing|git|onedir|onedir_rc|old-stable)')" = "" ]; then echoerror "Installation type \"$ITYPE\" is not known..." @@ -733,6 +718,31 @@ elif [ "$ITYPE" = "onedir_rc" ]; then fi fi +# Doing a quick start, so install master +# set master address to 127.0.0.1 +if [ "$_QUICK_START" -eq "$BS_TRUE" ]; then + # make install type is stable + ITYPE="stable" + + # make sure the revision is latest + STABLE_REV="latest" + ONEDIR_REV="latest" + + # make sure we're installing the master + _INSTALL_MASTER=$BS_TRUE + + # override incase install minion + # is set to false + _INSTALL_MINION=$BS_TRUE + + # Set master address to loopback IP + _SALT_MASTER_ADDRESS="127.0.0.1" + + # Auto accept the minion key + # when the install is done. + _AUTO_ACCEPT_MINION_KEYS=$BS_TRUE +fi + # Check for any unparsed arguments. Should be an error. if [ "$#" -gt 0 ]; then __usage diff --git a/kitchen.yml b/kitchen.yml index f5b0ddf..4ed6e6d 100644 --- a/kitchen.yml +++ b/kitchen.yml @@ -397,6 +397,10 @@ suites: - opensuse-tumbleweed - ubuntu-1804 + - name: quickstart + provisioner: + salt_bootstrap_options: -Q + verifier: name: shell remote_exec: false