Fix for removing local addresses as exporters addresses
Change-Id: Ifac8c8960497cb6dfe95e493583f07cee4d0833d
This commit is contained in:
parent
1aaa416bdc
commit
477ea05109
1 changed files with 7 additions and 1 deletions
|
@ -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) %}
|
||||||
|
|
Loading…
Reference in a new issue