aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvarac <varacanero@zeromail.org>2012-11-25 17:49:37 +0100
committervarac <varacanero@zeromail.org>2012-11-25 17:49:37 +0100
commitceb57f6a7073b9f7fddfda3ba5b734b168019285 (patch)
tree8ab59d5908cf2111184f197166acd2161ed4fefa
parent911cc18e594bb5a3ab642ebb24615a0447050c32 (diff)
downloadpuppet-shorewall-ceb57f6a7073b9f7fddfda3ba5b734b168019285.tar.gz
puppet-shorewall-ceb57f6a7073b9f7fddfda3ba5b734b168019285.tar.bz2
add rtrules
-rw-r--r--files/boilerplate/rtrules.footer1
-rw-r--r--files/boilerplate/rtrules.header8
-rw-r--r--manifests/base.pp1
-rw-r--r--manifests/init.pp2
-rw-r--r--manifests/rtrules.pp11
5 files changed, 23 insertions, 0 deletions
diff --git a/files/boilerplate/rtrules.footer b/files/boilerplate/rtrules.footer
new file mode 100644
index 0000000..5e12d1d
--- /dev/null
+++ b/files/boilerplate/rtrules.footer
@@ -0,0 +1 @@
+#LAST LINE -- ADD YOUR ENTRIES BEFORE THIS ONE -- DO NOT REMOVE
diff --git a/files/boilerplate/rtrules.header b/files/boilerplate/rtrules.header
new file mode 100644
index 0000000..fd9b2f4
--- /dev/null
+++ b/files/boilerplate/rtrules.header
@@ -0,0 +1,8 @@
+#
+# Shorewall version 4 - route rules File
+#
+# For information about entries in this file, type "man shorewall-rtrules"
+#
+# For additional information, see http://www.shorewall.net/MultiISP.html
+####################################################################################
+# SOURCE DEST PROVIDER PRIORITY MASK
diff --git a/manifests/base.pp b/manifests/base.pp
index 58b753e..c49c23b 100644
--- a/manifests/base.pp
+++ b/manifests/base.pp
@@ -42,6 +42,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/rtrules"],
],
require => Package[shorewall],
}
diff --git a/manifests/init.pp b/manifests/init.pp
index f69a6f2..72e0533 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -72,4 +72,6 @@ class shorewall {
# See http://www.shorewall.net/3.0/traffic_shaping.htm
shorewall::managed_file { tcclasses: }
+ shorewall::managed_file { rtrules: }
+
}
diff --git a/manifests/rtrules.pp b/manifests/rtrules.pp
new file mode 100644
index 0000000..eeb7cc6
--- /dev/null
+++ b/manifests/rtrules.pp
@@ -0,0 +1,11 @@
+define shorewall::rtrules(
+ $source = '-',
+ $destination = '-',
+ $provider,
+ $priority,
+ $mark,
+){
+ shorewall::entry { "rtrules.d/${mark}-${title}":
+ line => "# ${name}\n${source} ${destination} ${provider} ${priority} ${mark}",
+ }
+}