]> repo.cephalix.eu Git - SaltMinion.git/commitdiff
Make start script more conservative. master
authorbuildmaster <buildmaster@git.cephalix.eu>
Mon, 28 Mar 2022 09:03:15 +0000 (11:03 +0200)
committerbuildmaster <buildmaster@git.cephalix.eu>
Mon, 28 Mar 2022 09:03:15 +0000 (11:03 +0200)
Clean cache befor do anything.

100-update-salt.sh.in

index da9d34261fe95371640af09e1f676554ce7acd0a..bd9c79dc366c62d3fb82dc2a94bbc94df70a7e41 100644 (file)
@@ -3,10 +3,11 @@
 
 MINION=$1
 
 
 MINION=$1
 
-SALTV=$( salt $MINION grains.get saltversion | tail -n1 | tr -d ' ' )
-echo "$MINION $SALTV"
-if [ "${SALTV}" -a "$SALTV" != "VERSION" ]; then
-       salt $MINION state.apply SaltMinion
-       salt-key -yd $MINION
+SALTV=$( salt ${MINION} grains.get saltversion | tail -n1 | tr -d ' ' )
+echo "${MINION} ${SALTV}"
+if [ "${SALTV}" -a "${SALTV}" != "VERSION" ]; then
+       salt ${MINION} saltutil.clear_cache
+       salt ${MINION} state.apply SaltMinion
+       salt-key -yd ${MINION}
        sleep 10
 fi
        sleep 10
 fi