Merge pull request #4590 from Security-Onion-Solutions/kilo

only attempt to upgrade salt on minions if the minion count it > 1
This commit is contained in:
Jason Ertel
2021-06-22 11:36:37 -04:00
committed by GitHub

View File

@@ -932,7 +932,8 @@ main() {
[[ $is_airgap -eq 0 ]] && unmount_update [[ $is_airgap -eq 0 ]] && unmount_update
thehive_maint thehive_maint
if [[ $UPGRADESALT -eq 1 ]]; then NUM_MINIONS=$(ls /opt/so/saltstack/local/pillar/minions/*_*.sls | wc -l)
if [[ $UPGRADESALT -eq 1 ]] && [[ $NUM_MINIONS -gt 1 ]]; then
if [[ $is_airgap -eq 0 ]]; then if [[ $is_airgap -eq 0 ]]; then
echo "" echo ""
echo "Cleaning repos on remote Security Onion nodes." echo "Cleaning repos on remote Security Onion nodes."
@@ -959,8 +960,6 @@ main() {
esac esac
fi fi
NUM_MINIONS=$(ls /opt/so/saltstack/local/pillar/minions/*_*.sls | wc -l)
if [[ $NUM_MINIONS -gt 1 ]]; then if [[ $NUM_MINIONS -gt 1 ]]; then
cat << EOF cat << EOF