summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
Diffstat (limited to 'manifests')
-rw-r--r--manifests/init.pp3
-rw-r--r--manifests/providers.pp26
-rw-r--r--manifests/rtrules.pp11
3 files changed, 27 insertions, 13 deletions
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}",
+ }
+}