sort the items

This commit is contained in:
m0duspwnens
2021-12-13 18:16:25 -05:00
parent 067e79894f
commit 6518691c55

View File

@@ -325,7 +325,7 @@ output.logstash:
{%- if grains.role not in ['so-heavynode', 'so-import', 'so-helix', 'so-eval'] %}
{%- set LOADBALANCE = ['false'] %}
{%- set node_data = salt['pillar.get']('node_data') %}
{%- for node_type, node_details in node_data.items() %}
{%- 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() %}
- "{{ hostname }}:5644" #{{ node_details[hostname].ip }}