mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-09 18:52:52 +01:00
15 lines
634 B
Django/Jinja
15 lines
634 B
Django/Jinja
{% from 'vars/globals.map.jinja' import GLOBALS %}
|
|
{% set REDIS_NODES = [] %}
|
|
{% if GLOBALS.role in ['so-searchnode', 'so-standalone', 'so-managersearch'] %}
|
|
{% set node_data = salt['pillar.get']('logstash:nodes') %}
|
|
{% for node_type, node_details in node_data.items() | sort %}
|
|
{% if node_type in ['manager', 'managersearch', 'standalone', 'receiver' ] %}
|
|
{% for hostname in node_data[node_type].keys() %}
|
|
{% do REDIS_NODES.append({hostname:node_details[hostname].ip}) %}
|
|
{% endfor %}
|
|
{% endif %}
|
|
{% endfor %}
|
|
{% else %}
|
|
{% do REDIS_NODES.append({GLOBALS.hostname:GLOBALS.node_ip}) %}
|
|
{% endif %}
|