Add OLD_ prefix + only update rules if playbook enabled

This commit is contained in:
William Wernert
2020-10-02 14:34:30 -04:00
parent d0c267ca90
commit 2a100c0dcc
2 changed files with 5 additions and 3 deletions

View File

@@ -4,5 +4,5 @@
default_salt_dir=/opt/so/saltstack/default
docker cp $default_salt_dir/salt/playbook/files/playbook_db_init-old.sql so-mysql:/tmp/playbook_db_init.sql
docker cp $default_salt_dir/salt/playbook/files/OLD_playbook_db_init.sql so-mysql:/tmp/playbook_db_init.sql
docker exec so-mysql /bin/bash -c "/usr/bin/mysql -b -uroot -p{{MYSQLPASS}} < /tmp/playbook_db_init.sql"

View File

@@ -658,9 +658,11 @@ fi
set_progress_str 73 "$(print_salt_state_apply 'soctopus')"
salt-call state.apply -l info soctopus >> $setup_log 2>&1
if [[ "$PLAYBOOK" = 1 ]]; then
set_progress_str 73 "Update playbook rules"
so-playbook-ruleupdate >> /root/setup_playbook_rule_update.log 2>&1 &
fi
fi
if [[ "$OSQUERY" = 1 ]]; then
if [[ "$PLAYBOOK" != 1 ]]; then