Georg Pfuetzenreuter
698234c040
All checks were successful
ci/lysergic/push/pipeline Pipeline was successful
Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
18 lines
467 B
Django/Jinja
18 lines
467 B
Django/Jinja
{%- macro listeners() -%}
|
|
{%- set listen_ips = [] -%}
|
|
{%- set legal6s = ('fd29', '2a01:4f8:11e:2200') -%}
|
|
{%- for ip in salt['network.ip_addrs']() -%}
|
|
{%- if salt['network.is_private'](ip) -%}
|
|
{%- do listen_ips.append(ip) -%}
|
|
{%- endif -%}
|
|
{%- endfor -%}
|
|
{%- for ip in salt['network.ip_addrs6']() -%}
|
|
{%- if ip.startswith(legal6s) -%}
|
|
{%- do listen_ips.append(ip) -%}
|
|
{%- endif -%}
|
|
{%- endfor -%}
|
|
{%- for ip in listen_ips %}
|
|
- {{ ip }}
|
|
{%- endfor %}
|
|
{%- endmacro -%}
|