Merge "Fix for removing local addresses as exporters addresses"

This commit is contained in:
Bartosz Kupidura 2017-09-05 07:26:04 +00:00 committed by Gerrit Code Review
commit bd8f62f433

View file

@ -3,7 +3,13 @@
{%- do salt['defaults.merge'](exporters, new_exporters_cfg['exporters']) %} {%- do salt['defaults.merge'](exporters, new_exporters_cfg['exporters']) %}
{%- endif %} {%- endif %}
{%- set host = grains.get('host', "") %} {%- set host = grains.get('host', "") %}
{%- set host_ip_address = grains['fqdn_ip4'][0] %} {%- set fqdn_ip4_addresses = [] %}
{%- for addr in grains['fqdn_ip4'] %}
{%- if not addr.startswith('127.') %}
{%- do fqdn_ip4_addresses.append(addr) %}
{%- endif %}
{%- endfor %}
{%- set host_ip_address = fqdn_ip4_addresses[0] %}
{%- load_yaml as svc_configs %} {%- load_yaml as svc_configs %}
{%- for exporter, parameters in exporters.iteritems() %} {%- for exporter, parameters in exporters.iteritems() %}
{%- if parameters.get('enabled', False) %} {%- if parameters.get('enabled', False) %}