mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-13 04:32:48 +01:00
16 lines
669 B
Django/Jinja
16 lines
669 B
Django/Jinja
{% from 'vars/globals.map.jinja' import GLOBALS %}
|
|
{% set role = GLOBALS.role %}
|
|
{% set FILEBEAT_EXTRA_HOSTS = [] %}
|
|
{% if role in ['so-sensor', 'so-fleet', 'so-searchnode', 'so-idh'] %}
|
|
{% 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 FILEBEAT_EXTRA_HOSTS.append({hostname:node_details[hostname].ip}) %}
|
|
{% endfor %}
|
|
{% endif %}
|
|
{% endfor %}
|
|
{% endif %}
|
|
|
|
{% do FILEBEAT_EXTRA_HOSTS.append({GLOBALS.hostname:GLOBALS.node_ip}) %}
|