Merge pull request #13013 from Security-Onion-Solutions/issue/13012

remove idh.services from idh node pillar files
This commit is contained in:
Josh Patterson
2024-05-15 08:37:15 -04:00
committed by GitHub
2 changed files with 8 additions and 6 deletions

View File

@@ -201,11 +201,7 @@ function add_idh_to_minion() {
"idh:"\
" enabled: True"\
" restrict_management_ip: $IDH_MGTRESTRICT"\
" services:" >> "$PILLARFILE"
IFS=',' read -ra IDH_SERVICES_ARRAY <<< "$IDH_SERVICES"
for service in ${IDH_SERVICES_ARRAY[@]}; do
echo " - $service" | tr '[:upper:]' '[:lower:]' | tr -d '"' >> "$PILLARFILE"
done
" " >> $PILLARFILE
}
function add_logstash_to_minion() {

View File

@@ -438,7 +438,13 @@ post_to_2.4.60() {
}
post_to_2.4.70() {
echo "Nothing to apply"
echo "Removing idh.services from IDH node pillar files"
for file in /opt/so/saltstack/local/pillar/minions/*_idh.sls; do
if [[ ! $file =~ "/opt/so/saltstack/local/pillar/minions/adv_" ]]; then
echo "Removing idh.services from: $file"
so-yaml.py remove "$file" idh.services
fi
done
POSTVERSION=2.4.70
}