Add playbook updates

This commit is contained in:
Mike Reeves
2020-08-19 12:14:11 -04:00
committed by GitHub
parent 9280dbb9d9
commit 3d48c1f99b

View File

@@ -108,6 +108,15 @@ masterunlock() {
fi
}
playbook() {
echo "Applying playbook settings"
if [[ "$INSTALLEDVERSION" =~ rc.1 ]]; then
salt-call state.apply playbook.db_init
rm -f /opt/so/rules/elastalert/playbook/*.yaml
so-playbook-ruleupdate >> /root/soup_playbook_rule_update.log 2>&1 &
fi
}
pillar_changes() {
# This function is to add any new pillar items if needed.
echo "Checking to see if pillar changes are needed."
@@ -387,6 +396,8 @@ masterunlock
echo ""
echo "Starting Salt Master service."
systemctl start salt-master
highstate
playbook
SALTUPGRADED="True"
if [[ "$SALTUPGRADED" == "True" ]]; then