From: Silvio Rhatto Date: Tue, 23 Mar 2010 00:48:20 +0000 (-0300) Subject: Introducing $max_in_bandwidth and $max_out_bandwidth X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=7433f4dfc9ea4056871ef273368e9826ccf38517;p=puppet-nodo.git Introducing $max_in_bandwidth and $max_out_bandwidth --- 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":