From 5b347600e9a3ae2c2fd045329703f9e3c04928fc Mon Sep 17 00:00:00 2001 From: Josh Patterson Date: Wed, 12 Jan 2022 12:24:52 -0500 Subject: [PATCH] push ips of mainint to salt mine --- salt/common/tools/sbin/soup | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/salt/common/tools/sbin/soup b/salt/common/tools/sbin/soup index f5b012bb6..24b13a408 100755 --- a/salt/common/tools/sbin/soup +++ b/salt/common/tools/sbin/soup @@ -735,6 +735,13 @@ update_centos_repo() { createrepo /nsm/repo } +update_salt_mine() { + echo "Populating the mine with network.ip_addrs pillar.host.mainint for each host." + set +e + salt \* cmd.run cmd='MAININT=$(salt-call pillar.get host:mainint --out=newline_values_only) && salt-call mine.send name=network.ip_addrs interface="$MAININT"' + set -e +} + update_version() { # Update the version to the latest echo "Updating the Security Onion version file." @@ -973,6 +980,9 @@ main() { echo "Performing upgrade from Security Onion $INSTALLEDVERSION to Security Onion $NEWVERSION." echo "" + # update mine items prior to stopping salt-minion and salt-master + update_salt_mine + echo "Updating dockers to $NEWVERSION." if [[ $is_airgap -eq 0 ]]; then airgap_update_dockers