From e3cd6cee21536d5ee6f3a3890aba2529fb4238c1 Mon Sep 17 00:00:00 2001 From: buildmaster Date: Fri, 11 Feb 2022 11:10:38 +0100 Subject: [PATCH] Fix plugin script to find the right version Reboot the client after installing the new salt version --- 100-update-salt.sh.in | 6 +++--- init.sls.in | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/100-update-salt.sh.in b/100-update-salt.sh.in index d5575d0..da9d342 100644 --- a/100-update-salt.sh.in +++ b/100-update-salt.sh.in @@ -1,10 +1,10 @@ #!/bin/bash -# Package to update the salt-minion on the clients. +# Script to update the salt-minion on the clients. MINION=$1 -SALTV=$( salt $MINION grains.get saltversion | tail -n1 ) - +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 diff --git a/init.sls.in b/init.sls.in index 7ad7383..bc1e621 100644 --- a/init.sls.in +++ b/init.sls.in @@ -27,6 +27,6 @@ SaltMinion: install_flags: '/S /master=admin /minion-name={{ name }}' locale: de_DE msiexec: False - reboot: False + reboot: True cache_dir: False -- 2.43.0