summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2013-01-02 19:34:31 +0100
committermh <mh@immerda.ch>2013-01-02 19:34:31 +0100
commit58103ed409fc61d8e653babb73fcaf510969f3db (patch)
tree0c022f3ff326248cc7194d3d1e5c768acfbcb399
parent2f388687ea30fdefdcd405807a0fce699807809d (diff)
parentfaf6fba9579e285efd28f2ef96a7e3a5d4a5dd4b (diff)
Merge remote-tracking branch 'varac/master'
Conflicts: files/boilerplate/providers.footer files/boilerplate/providers.header manifests/base.pp manifests/providers.pp
-rw-r--r--files/boilerplate/providers.footer2
-rw-r--r--files/boilerplate/providers.header2
-rw-r--r--files/boilerplate/rtrules.footer1
-rw-r--r--files/boilerplate/rtrules.header8
-rw-r--r--manifests/init.pp3
-rw-r--r--manifests/providers.pp26
-rw-r--r--manifests/rtrules.pp11
7 files changed, 38 insertions, 15 deletions
diff --git a/files/boilerplate/providers.footer b/files/boilerplate/providers.footer
index 6bebc05..5e12d1d 100644
--- a/files/boilerplate/providers.footer
+++ b/files/boilerplate/providers.footer
@@ -1 +1 @@
-#LAST LINE -- ADD YOUR ENTRIES ABOVE THIS LINE -- DO NOT REMOVE
+#LAST LINE -- ADD YOUR ENTRIES BEFORE THIS ONE -- DO NOT REMOVE
diff --git a/files/boilerplate/providers.header b/files/boilerplate/providers.header
index c5fb1c5..b4a5990 100644
--- a/files/boilerplate/providers.header
+++ b/files/boilerplate/providers.header
@@ -6,4 +6,4 @@
# For additional information, see http://shorewall.net/MultiISP.html
#
############################################################################################
-#NAME NUMBER MARK DUPLICATE INTERFACE GATEWAY OPTIONS COPY
+#NAME NUMBER MARK DUPLICATE INTERFACE GATEWAY OPTIONS COPY
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/init.pp b/manifests/init.pp
index 580dc8c..63e6fd3 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -63,4 +63,7 @@ class shorewall(
# See http://www.shorewall.net/manpages/shorewall-tunnels.html
shorewall::managed_file { tunnel: }
+ shorewall::managed_file { rtrules: }
+ shorewall::managed_file { providers: }
+
}
diff --git a/manifests/providers.pp b/manifests/providers.pp
index a02a494..a1f8726 100644
--- a/manifests/providers.pp
+++ b/manifests/providers.pp
@@ -1,16 +1,16 @@
+# manage providers
define shorewall::providers(
- $provider,
- $number = '',
- $mark = '',
- $duplicate = 'main',
- $interface = '',
- $gateway = '',
- $options = '',
- $copy = '',
- $order='100'
+ $provider = $name,
+ $number = '',
+ $mark = '',
+ $duplicate = 'main',
+ $interface = '',
+ $gateway = '',
+ $options = '',
+ $copy = '',
+ $order = '100'
){
- shorewall::entry{"providers-${order}-${name}":
- line => "# ${name}\n${provider} ${number} ${mark} ${duplicate} ${interface} ${gateway} ${options} ${copy}"
- }
+ shorewall::entry{"providers-${order}-${name}":
+ line => "# ${name}\n${provider} ${number} ${mark} ${duplicate} ${interface} ${gateway} ${options} ${copy}"
+ }
}
-
diff --git a/manifests/rtrules.pp b/manifests/rtrules.pp
new file mode 100644
index 0000000..34e12b4
--- /dev/null
+++ b/manifests/rtrules.pp
@@ -0,0 +1,11 @@
+define shorewall::rtrules(
+ $source = '-',
+ $destination = '-',
+ $provider,
+ $priority = '10000',
+ $mark,
+){
+ shorewall::entry { "rtrules.d/${mark}-${title}":
+ line => "# ${name}\n${source} ${destination} ${provider} ${priority} ${mark}",
+ }
+}