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
template:
src: pf.conf.j2
......
---
- include_tasks: configure.yml
- call_tasks:
from: configure
- name: enable pf
service:
......@@ -11,6 +12,3 @@
service:
name: pf
state: started
{% if network.nat is defined %}
{% 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 %}
scrub in all
{% endif %}
{% do natifs.append(nif.intdevice) %}
{% do natifs.append("%s:%s" | format(nif.extdevice, nif.intdevice)) %}
{% if nif.ipv4 is defined %}
{{ 'nat on %s inet from %s:network to any -> (%s)' | format(nif.extdevice, nif.intdevice, nif.extdevice) }}
{% 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