From 067e79894f7f6cfad3677a4a198cf66f8d1676d9 Mon Sep 17 00:00:00 2001 From: m0duspwnens Date: Mon, 13 Dec 2021 16:26:38 -0500 Subject: [PATCH] fix loop for node_data --- salt/filebeat/etc/filebeat.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/salt/filebeat/etc/filebeat.yml b/salt/filebeat/etc/filebeat.yml index e11dabb8b..f04149958 100644 --- a/salt/filebeat/etc/filebeat.yml +++ b/salt/filebeat/etc/filebeat.yml @@ -322,13 +322,13 @@ 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 node_data %} +{%- set LOADBALANCE = ['false'] %} +{%- set node_data = salt['pillar.get']('node_data') %} +{%- for node_type, node_details in node_data.items() %} {%- if node_type in ['manager', 'managersearch', 'standalone', 'receiver' ] %} {%- for hostname in node_data[node_type].keys() %} - - "{{ hostname }}:5644" #{{ node_details[hostname][ip] }} + - "{{ hostname }}:5644" #{{ node_details[hostname].ip }} {%- endfor %} {%- endif %} {%- if loop.index == 2 %}