mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
Fix soup to clear yum cache for airgap
This commit is contained in:
@@ -140,9 +140,9 @@ detect_os() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
highstate() {
|
highstate() {
|
||||||
# Run a highstate but first cancel a running one.
|
# Run a highstate.
|
||||||
salt-call saltutil.kill_all_jobs
|
echo "Running a highstate. This could take a few minutes"
|
||||||
salt-call state.highstate -l info
|
salt-call state.highstate -l info queue=True
|
||||||
}
|
}
|
||||||
|
|
||||||
masterlock() {
|
masterlock() {
|
||||||
@@ -529,6 +529,7 @@ if [ "$UPGRADESALT" == "1" ]; then
|
|||||||
# Update the repo files so it can actually upgrade
|
# Update the repo files so it can actually upgrade
|
||||||
if [ $is_airgap -eq 0 ]; then
|
if [ $is_airgap -eq 0 ]; then
|
||||||
update_centos_repo
|
update_centos_repo
|
||||||
|
yum clean all
|
||||||
fi
|
fi
|
||||||
upgrade_salt
|
upgrade_salt
|
||||||
fi
|
fi
|
||||||
@@ -575,10 +576,12 @@ highstate
|
|||||||
playbook
|
playbook
|
||||||
unmount_update
|
unmount_update
|
||||||
|
|
||||||
SALTUPGRADED="True"
|
if [ "$UPGRADESALT" == "1" ]; then
|
||||||
if [[ "$SALTUPGRADED" == "True" ]]; then
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "Upgrading Salt on the remaining Security Onion nodes from $INSTALLEDSALTVERSION to $NEWSALTVERSION."
|
echo "Upgrading Salt on the remaining Security Onion nodes from $INSTALLEDSALTVERSION to $NEWSALTVERSION."
|
||||||
|
if [ $is_airgap -eq 0 ]; then
|
||||||
|
salt -C 'not *_eval and not *_helix and not *_manager and not *_managersearch and not *_standalone' cmd.run "yum clean all"
|
||||||
|
fi
|
||||||
salt -C 'not *_eval and not *_helix and not *_manager and not *_managersearch and not *_standalone' -b $BATCHSIZE state.apply salt.minion
|
salt -C 'not *_eval and not *_helix and not *_manager and not *_managersearch and not *_standalone' -b $BATCHSIZE state.apply salt.minion
|
||||||
echo ""
|
echo ""
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user