mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-07 17:52:46 +01:00
Refactor for Jinja instead
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
# or more contributor license agreements. Licensed under the Elastic License 2.0; you may not use
|
# or more contributor license agreements. Licensed under the Elastic License 2.0; you may not use
|
||||||
# this file except in compliance with the Elastic License 2.0.
|
# this file except in compliance with the Elastic License 2.0.
|
||||||
{% from 'vars/globals.map.jinja' import GLOBALS %}
|
{% from 'vars/globals.map.jinja' import GLOBALS %}
|
||||||
|
{% from 'elasticfleet/map.jinja' import ELASTICFLEETMERGED %}
|
||||||
|
|
||||||
. /usr/sbin/so-common
|
. /usr/sbin/so-common
|
||||||
|
|
||||||
@@ -41,14 +42,16 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Query for FQDN entries & add them to the list
|
# Query for FQDN entries & add them to the list
|
||||||
CUSTOMFQDNLIST=$( salt-call --out=json pillar.get elasticfleet:config:server:custom_fqdn | jq -r '.local | .[]')
|
{% if ELASTICFLEETMERGED.config.server.custom_fqdn | length > 0 %}
|
||||||
|
CUSTOMFQDNLIST=({{ ELASTICFLEETMERGED.config.server.custom_fqdn | join(' ') }})
|
||||||
if [ -n "$CUSTOMFQDNLIST" ]; then
|
if [ -n "$CUSTOMFQDNLIST" ]; then
|
||||||
readarray -t CUSTOMFQDN <<< $CUSTOMFQDNLIST
|
readarray -t CUSTOMFQDN <<< $CUSTOMFQDNLIST
|
||||||
for CUSTOMNAME in "${CUSTOMFQDN[@]}"
|
for CUSTOMNAME in "${CUSTOMFQDN[@]}"
|
||||||
do
|
do
|
||||||
NEW_LIST+=("$CUSTOMNAME:5055")
|
NEW_LIST+=("https://$CUSTOMNAME:8220")
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
# Query for the current Grid Nodes that are running Logstash
|
# Query for the current Grid Nodes that are running Logstash
|
||||||
LOGSTASHNODES=$(salt-call --out=json pillar.get logstash:nodes | jq '.local')
|
LOGSTASHNODES=$(salt-call --out=json pillar.get logstash:nodes | jq '.local')
|
||||||
|
|||||||
Reference in New Issue
Block a user