summaryrefslogtreecommitdiffstats
path: root/pillar/map.jinja
diff options
context:
space:
mode:
Diffstat (limited to 'pillar/map.jinja')
-rw-r--r--pillar/map.jinja4
1 files changed, 4 insertions, 0 deletions
diff --git a/pillar/map.jinja b/pillar/map.jinja
index 849eb15..239144a 100644
--- a/pillar/map.jinja
+++ b/pillar/map.jinja
@@ -9,6 +9,8 @@
{#- START Listener detection logic -#}
{%- set listen_ips = [] -%}
+{%- set listen_ips4 = [] -%}
+{%- set listen_ips6 = [] -%}
{%- set minion = grains['id'] -%}
{%- set legal6s = ('fd29', '2a01:4f8:11e:2200') -%}
{%- set ip4s = salt.saltutil.runner('mine.get', tgt=minion, fun='network.ip_addrs', tgt_type='glob') -%}
@@ -16,11 +18,13 @@
{%- if minion in ip4s -%}{%- for ip in ip4s[minion] -%}
{%- if salt['network.is_private'](ip) -%}
{%- do listen_ips.append(ip) -%}
+{%- do listen_ips4.append(ip) -%}
{%- endif -%}
{%- endfor -%}{%- endif -%}
{%- if minion in ip6s -%}{%- for ip in ip6s[minion] -%}
{%- if ip.startswith(legal6s) -%}
{%- do listen_ips.append(ip) -%}
+{%- do listen_ips6.append(ip) -%}
{%- endif -%}
{%- endfor -%}{%- endif -%}