mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-07 17:52:46 +01:00
add node_data.ips pillar. grab influx host ip for soc extra_hosts
This commit is contained in:
@@ -1,7 +1,5 @@
|
|||||||
{% set node_types = {} %}
|
{% set node_types = {} %}
|
||||||
{% set manage_alived = salt.saltutil.runner('manage.alived', show_ip=True) %}
|
{% set manage_alived = salt.saltutil.runner('manage.alived', show_ip=True) %}
|
||||||
{% set manager = grains.master %}
|
|
||||||
{% set manager_type = manager.split('_')|last %}
|
|
||||||
{% for minionid, ip in salt.saltutil.runner('mine.get', tgt='*', fun='network.ip_addrs', tgt_type='glob') | dictsort() %}
|
{% for minionid, ip in salt.saltutil.runner('mine.get', tgt='*', fun='network.ip_addrs', tgt_type='glob') | dictsort() %}
|
||||||
{% set hostname = minionid.split('_')[0] %}
|
{% set hostname = minionid.split('_')[0] %}
|
||||||
{% set node_type = minionid.split('_')[1] %}
|
{% set node_type = minionid.split('_')[1] %}
|
||||||
@@ -24,10 +22,10 @@
|
|||||||
|
|
||||||
node_data:
|
node_data:
|
||||||
{% for node_type, host_values in node_types.items() %}
|
{% for node_type, host_values in node_types.items() %}
|
||||||
{{node_type}}:
|
|
||||||
{% for hostname, details in host_values.items() %}
|
{% for hostname, details in host_values.items() %}
|
||||||
{{hostname}}:
|
{{hostname}}:
|
||||||
ip: {{details.ip}}
|
ip: {{details.ip}}
|
||||||
alive: {{ details.alive }}
|
alive: {{ details.alive }}
|
||||||
|
role: {{node_type}}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ base:
|
|||||||
- sensoroni.adv_sensoroni
|
- sensoroni.adv_sensoroni
|
||||||
- telegraf.soc_telegraf
|
- telegraf.soc_telegraf
|
||||||
- telegraf.adv_telegraf
|
- telegraf.adv_telegraf
|
||||||
|
- node_data.ips
|
||||||
|
|
||||||
'* and not *_eval and not *_import':
|
'* and not *_eval and not *_import':
|
||||||
- logstash.nodes
|
- logstash.nodes
|
||||||
|
|||||||
@@ -110,8 +110,9 @@ so-soc:
|
|||||||
- /opt/so/conf/soc/soc_users_roles:/opt/sensoroni/rbac/users_roles:rw
|
- /opt/so/conf/soc/soc_users_roles:/opt/sensoroni/rbac/users_roles:rw
|
||||||
- /opt/so/conf/soc/salt:/opt/sensoroni/salt:rw
|
- /opt/so/conf/soc/salt:/opt/sensoroni/salt:rw
|
||||||
- /opt/so/saltstack:/opt/so/saltstack:rw
|
- /opt/so/saltstack:/opt/so/saltstack:rw
|
||||||
{%- if salt['pillar.get']('nodestab', {}) %}
|
|
||||||
- extra_hosts:
|
- extra_hosts:
|
||||||
|
- {{GLOBALS.influxdb_host}}:{{pillar.node_data[GLOBALS.influxdb_host].ip}}
|
||||||
|
{%- if salt['pillar.get']('nodestab', {}) %}
|
||||||
{%- for SN, SNDATA in salt['pillar.get']('nodestab', {}).items() %}
|
{%- for SN, SNDATA in salt['pillar.get']('nodestab', {}).items() %}
|
||||||
- {{ SN.split('_')|first }}:{{ SNDATA.ip }}
|
- {{ SN.split('_')|first }}:{{ SNDATA.ip }}
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
|
|||||||
Reference in New Issue
Block a user