aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2010-03-22 21:48:20 -0300
committerSilvio Rhatto <rhatto@riseup.net>2010-03-22 21:48:20 -0300
commit7433f4dfc9ea4056871ef273368e9826ccf38517 (patch)
treec0cadb362692f666c972719b1f3b6b8652221c70
parentd690cc923ecdc430f8199d32faa84002ea7b40fa (diff)
downloadpuppet-nodo-7433f4dfc9ea4056871ef273368e9826ccf38517.tar.gz
puppet-nodo-7433f4dfc9ea4056871ef273368e9826ccf38517.tar.bz2
Introducing $max_in_bandwidth and $max_out_bandwidth
-rw-r--r--manifests/firewall.pp14
1 files changed, 12 insertions, 2 deletions
diff --git a/manifests/firewall.pp b/manifests/firewall.pp
index 6aea13d..765a59f 100644
--- a/manifests/firewall.pp
+++ b/manifests/firewall.pp
@@ -151,9 +151,19 @@ class firewall {
#
# Traffic shapping
#
+ $in_bandwidth = $max_in_bandwidth ? {
+ '' => "2mbit",
+ default => "$max_in_bandwidth",
+ }
+
+ $out_bandwidth = $max_out_bandwidth ? {
+ '' => "2mbit",
+ default => "$max_out_bandwidth",
+ }
+
shorewall::tcdevices { "eth0":
- in_bandwidth => "2mbit",
- out_bandwidth => "2mbit",
+ in_bandwidth => "$in_bandwidth",
+ out_bandwidth => "$out_bandwidth",
}
shorewall::tcrules { "ssh-tcp":