mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 09:12:45 +01:00
17 lines
733 B
Django/Jinja
17 lines
733 B
Django/Jinja
{% set role = grains.role %}
|
|
{% set FILEBEAT_EXTRA_HOSTS = [] %}
|
|
{% set mainint = salt['pillar.get']('host:mainint') %}
|
|
{% set localhostip = salt['grains.get']('ip_interfaces').get(mainint)[0] %}
|
|
{% if role in ['so-sensor', 'so-fleet', 'so-node', '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({grains.host:localhostip}) %}
|