From 6de2f5bd03b3bc0afbce3671581d5abd7adc8640 Mon Sep 17 00:00:00 2001 From: m0duspwnens Date: Mon, 13 Dec 2021 15:55:09 -0500 Subject: [PATCH] fix node_data --- salt/filebeat/etc/filebeat.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/salt/filebeat/etc/filebeat.yml b/salt/filebeat/etc/filebeat.yml index f29205743..e11dabb8b 100644 --- a/salt/filebeat/etc/filebeat.yml +++ b/salt/filebeat/etc/filebeat.yml @@ -323,10 +323,11 @@ output.logstash: # The Logstash hosts hosts: {%- 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'] %} -{%- 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' ] %} -{%- for hostname in node_type.keys() %} +{%- for hostname in node_data[node_type].keys() %} - "{{ hostname }}:5644" #{{ node_details[hostname][ip] }} {%- endfor %} {%- endif %}