fix node_data

This commit is contained in:
m0duspwnens
2021-12-13 15:55:09 -05:00
parent 8d0872bce5
commit 6de2f5bd03

View File

@@ -323,10 +323,11 @@ output.logstash:
# The Logstash hosts # The Logstash hosts
hosts: hosts:
{%- set LOADBALANCE = ['false'] %} {%- set LOADBALANCE = ['false'] %}
{%- set node_data = salt['pillar.get']('node_data') | dictsort() %}
{%- if grains.role not in ['so-heavynode', 'so-import', 'so-helix', 'so-eval'] %} {%- if grains.role not in ['so-heavynode', 'so-import', 'so-helix', 'so-eval'] %}
{%- for node_type, node_details in salt['pillar.get']('node_data') | dictsort() %} {%- for node_type, node_details in node_data %}
{%- if node_type in ['manager', 'managersearch', 'standalone', 'receiver' ] %} {%- if node_type in ['manager', 'managersearch', 'standalone', 'receiver' ] %}
{%- for hostname in node_type.keys() %} {%- for hostname in node_data[node_type].keys() %}
- "{{ hostname }}:5644" #{{ node_details[hostname][ip] }} - "{{ hostname }}:5644" #{{ node_details[hostname][ip] }}
{%- endfor %} {%- endfor %}
{%- endif %} {%- endif %}