Compare commits
2 Commits
a6883f3f9e
...
bd7fe25eb0
Author | SHA1 | Date | |
---|---|---|---|
bd7fe25eb0 | |||
bd166cbb42 |
@ -2,16 +2,18 @@
|
||||
{%- set listen_ips = [] -%}
|
||||
{%- set minion = grains['id'] -%}
|
||||
{%- set legal6s = ('fd29', '2a01:4f8:11e:2200') -%}
|
||||
{%- for ip in salt.saltutil.runner('mine.get', tgt=minion, fun='network.ip_addrs', tgt_type='glob')[minion] -%}
|
||||
{%- set ip4s = salt.saltutil.runner('mine.get', tgt=minion, fun='network.ip_addrs', tgt_type='glob') -%}
|
||||
{%- set ip6s = salt.saltutil.runner('mine.get', tgt=minion, fun='network.ip_addrs6', tgt_type='glob') -%}
|
||||
{%- if minion in ip4s -%}{%- for ip in ip4s[minion] -%}
|
||||
{%- if salt['network.is_private'](ip) -%}
|
||||
{%- do listen_ips.append(ip) -%}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
{%- for ip in salt.saltutil.runner('mine.get', tgt=minion, fun='network.ip_addrs6', tgt_type='glob')[minion] -%}
|
||||
{%- endfor -%}{%- endif -%}
|
||||
{%- if minion in ip6s -%}{%- for ip in ip6s[minion] -%}
|
||||
{%- if ip.startswith(legal6s) -%}
|
||||
{%- do listen_ips.append(ip) -%}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
{%- endfor -%}{%- endif -%}
|
||||
{%- for ip in listen_ips %}
|
||||
- {{ ip }}
|
||||
{%- endfor %}
|
||||
|
@ -1,3 +1,4 @@
|
||||
salt:
|
||||
hash_type: sha512
|
||||
log_level: info
|
||||
rootgroup: salt
|
||||
|
Loading…
x
Reference in New Issue
Block a user