]> gitweb.fluxo.info Git - puppet-shorewall.git/commitdiff
Adding shorewall::tunnel
authorSilvio Rhatto <rhatto@riseup.net>
Wed, 14 Sep 2011 01:16:00 +0000 (22:16 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Wed, 14 Sep 2011 01:16:00 +0000 (22:16 -0300)
manifests/base.pp
manifests/init.pp
manifests/tunnel.pp [new file with mode: 0644]

index 53600e75c2932f7857d126a0f964965d1f8f7da6..be3b1f693d4ef4aabae3cbe29ab1238c7df14608 100644 (file)
@@ -46,6 +46,7 @@ class shorewall::base {
             File["/var/lib/puppet/modules/shorewall/tcdevices"],
             File["/var/lib/puppet/modules/shorewall/tcrules"],
             File["/var/lib/puppet/modules/shorewall/tcclasses"],
+            File["/var/lib/puppet/modules/shorewall/tunnel"],
         ],
         require => Package[shorewall],
     }
index f69a6f26c12f2478c489bdb5ea4c5fce2fdf6cc4..57dbeac19becc670bf48236288a45681b972d421 100644 (file)
@@ -71,5 +71,7 @@ class shorewall {
   shorewall::managed_file { tcrules: }
   # See http://www.shorewall.net/3.0/traffic_shaping.htm
   shorewall::managed_file { tcclasses: }
+  # See http://www.shorewall.net/manpages/shorewall-tunnels.html
+  shorewall::managed_file { tunnel: }
   
 }
diff --git a/manifests/tunnel.pp b/manifests/tunnel.pp
new file mode 100644 (file)
index 0000000..e0c71e7
--- /dev/null
@@ -0,0 +1,11 @@
+define shorewall::tunnel(
+    $tunnel_type,
+    $zone,
+    $gateway = '0.0.0.0/0',
+    $gateway_zones = '',
+    $order = '1'
+) {
+    shorewall::entry { "tunnel.d/${order}-${title}":
+        line => "# ${name}\n${tunnel_type} ${zone} ${gateway} ${gateway_zones}",
+    }
+}