diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2022-01-08 15:50:26 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2022-01-08 15:50:26 -0300 |
commit | 3d1cf84f39fece3f2a9f8b7247a792212eb81177 (patch) | |
tree | f1fa5ca591908d363d13d30256f7af3b242d2d6b /manifests/ppp.pp | |
parent | 55fa862bae8e2582e5ac0c008a0bb0ec53d9bfff (diff) | |
download | puppet-firewall-3d1cf84f39fece3f2a9f8b7247a792212eb81177.tar.gz puppet-firewall-3d1cf84f39fece3f2a9f8b7247a792212eb81177.tar.bz2 |
Feat: major refactor
Diffstat (limited to 'manifests/ppp.pp')
-rw-r--r-- | manifests/ppp.pp | 38 |
1 files changed, 6 insertions, 32 deletions
diff --git a/manifests/ppp.pp b/manifests/ppp.pp index e9ce789..33972e3 100644 --- a/manifests/ppp.pp +++ b/manifests/ppp.pp @@ -1,36 +1,10 @@ class firewall::ppp( - $interface = 'ppp0', - $zone = 'ppp' + $implementation = lookup('firewall::implementation', undef, undef, 'shorewall'), + $interface = 'ppp0', + $zone = 'ppp' ) { - shorewall::interface { $interface: - zone => $zone, - } - - if $zone == 'ppp' { - shorewall::zone { 'ppp': - type => 'ipv4', - order => 4, - } - - shorewall::policy { 'loc-ppp': - sourcezone => 'loc', - destinationzone => $zone, - policy => 'ACCEPT', - order => 30, - } - - shorewall::policy { 'ppp-loc': - sourcezone => 'ppp', - destinationzone => $zone, - policy => 'ACCEPT', - order => 31, - } - - shorewall::policy { 'fw-ppp': - sourcezone => '$FW', - destinationzone => $zone, - policy => 'ACCEPT', - order => 32, - } + class { "firewall::implementations::${implementation}::ppp": + interface => $interface, + zone => $zone, } } |