mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 09:12:45 +01:00
check for phases with so-yaml, remove if exists
This commit is contained in:
@@ -349,20 +349,24 @@ masterunlock() {
|
|||||||
|
|
||||||
phases_pillar_2_4_80() {
|
phases_pillar_2_4_80() {
|
||||||
echo "Checking if pillar value: elasticsearch.index_settings.global_overrides.index_template.phases exists"
|
echo "Checking if pillar value: elasticsearch.index_settings.global_overrides.index_template.phases exists"
|
||||||
|
PHASES=$(so-yaml.py get /opt/so/saltstack/local/pillar/elasticsearch/soc_elasticsearch.sls elasticsearch.index_settings.global_overrides.index_template.phases)
|
||||||
set +e
|
case $? in
|
||||||
#so-yaml.py remove /opt/so/saltstack/local/pillar/elasticsearch/soc_elasticsearch.sls elasticsearch.index_settings.global_overrides.index_template.phases
|
0)
|
||||||
#if so-yaml removed stuff add this message to the FINAL_MESSAGE_QUEUE
|
so-yaml.py remove /opt/so/saltstack/local/pillar/elasticsearch/soc_elasticsearch.sls elasticsearch.index_settings.global_overrides.index_template.phases
|
||||||
read -r -d '' msg << EOF
|
set +e
|
||||||
Found elasticsearch.index_settings.global_overrides.index_template.phases set to:
|
read -r -d '' msg << EOF
|
||||||
so-yaml removed stuff here
|
Found elasticsearch.index_settings.global_overrides.index_template.phases was set to:
|
||||||
A backup of all pillars was saved to /nsm/backup/
|
${PHASES}
|
||||||
Removed unused pillar value: elasticsearch.index_settings.global_overrides.index_template.phases
|
Removed unused pillar value: elasticsearch.index_settings.global_overrides.index_template.phases
|
||||||
If you want to set policies, navigate to the SOC Grid Configuration UI at elasticsearch.index_settings.global_overrides.policy.phases
|
If you want to set policies, navigate to the SOC Grid Configuration UI at elasticsearch.index_settings.global_overrides.policy.phases
|
||||||
|
A backup of all pillars was saved to /nsm/backup/
|
||||||
EOF
|
EOF
|
||||||
|
FINAL_MESSAGE_QUEUE+=("$msg")
|
||||||
FINAL_MESSAGE_QUEUE+=("$msg")
|
set -e
|
||||||
set -e
|
;;
|
||||||
|
2) echo "Pillar elasticsearch.index_settings.global_overrides.index_template.phases does not exist. No action taken." ;;
|
||||||
|
*) echo "so-yaml.py returned something other than 0 or 2 exit code" ;; # we shouldn't see this
|
||||||
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
preupgrade_changes() {
|
preupgrade_changes() {
|
||||||
|
|||||||
Reference in New Issue
Block a user