Compare commits

..

No commits in common. "ba6522ce5b0c2a4f851fe4826aa9f077a4d3d381" and "1a03ecc9db090051fdb5fb720961f5e6a069246e" have entirely different histories.

5 changed files with 3 additions and 26 deletions

View File

@ -1,5 +1,4 @@
- firewalld
- nginx
- openssh
- postfix
- salt

View File

@ -1,4 +1,4 @@
{%- from slspath ~ '/../map.jinja' import firewall_interfaces, public, internal, backend %}
{%- from slspath ~ '/map.jinja' import firewall_interfaces, public, internal, backend %}
include:
- role.salt.common

View File

@ -1,29 +1,7 @@
{%- from 'macros.jinja' import firewall_interfaces, listeners -%}
{%- from slspath ~ '/macros.jinja' import firewall_interfaces -%}
{%- set firewall_interfaces = firewall_interfaces -%}
{%- set listeners = listeners -%}
{%- set minion = grains['id'] -%}
{#- START Listener detection logic -#}
{%- set listen_ips = [] -%}
{%- 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') -%}
{%- 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 -%}{%- endif -%}
{%- if minion in ip6s -%}{%- for ip in ip6s[minion] -%}
{%- if ip.startswith(legal6s) -%}
{%- do listen_ips.append(ip) -%}
{%- endif -%}
{%- endfor -%}{%- endif -%}
{#- END Listener detection logic -%}
{#- START Interface mapping logic -#}
{%- set public = [] -%}

View File

@ -1,4 +1,4 @@
{%- from slspath ~ '/../map.jinja' import listeners -%}
{%- from slspath ~ '/../global/macros.jinja' import listeners -%}
{#-
{%- from '/tmp/salt-libertacasa/pillar/global/macros.jinja' import listeners with context -%}
#}