Commit e3ff7c20 authored by Richter, Robin's avatar Richter, Robin
Browse files

Merge branch 'master' of gitlab.mn.tu-dresden.de:sdm/package.pf

parents 1c985dd8 e62fbab8
---
- name: configure pf - name: configure pf
template: template:
src: pf.conf.j2 src: pf.conf.j2
......
--- ---
- include_tasks: configure.yml - call_tasks:
from: configure
- name: enable pf - name: enable pf
service: service:
...@@ -11,6 +12,3 @@ ...@@ -11,6 +12,3 @@
service: service:
name: pf name: pf
state: started state: started
{% if network.nat is defined %} {% if network.nat is defined %}
{% set natifs = [] %} {% set natifs = [] %}
{% for nif in network.nat if not nif.intdevice in natifs %} {% for nif in network.nat if not ("%s:%s" | format(nif.extdevice, nif.intdevice)) in natifs %}
{% if loop.index == 1 %} {% if loop.index == 1 %}
scrub in all scrub in all
{% endif %} {% endif %}
{% do natifs.append(nif.intdevice) %} {% do natifs.append("%s:%s" | format(nif.extdevice, nif.intdevice)) %}
{% if nif.ipv4 is defined %} {% if nif.ipv4 is defined %}
{{ 'nat on %s inet from %s:network to any -> (%s)' | format(nif.extdevice, nif.intdevice, nif.extdevice) }} {{ 'nat on %s inet from %s:network to any -> (%s)' | format(nif.extdevice, nif.intdevice, nif.extdevice) }}
{% endif %} {% endif %}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment