]> gitweb.fluxo.info Git - puppet-nodo.git/commitdiff
Using in_bandwidth and out_bandwidth as parameters at firewall class
authorSilvio Rhatto <rhatto@riseup.net>
Thu, 24 Jan 2013 23:38:53 +0000 (21:38 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Thu, 24 Jan 2013 23:38:53 +0000 (21:38 -0200)
manifests/subsystems/firewall.pp

index 0bde7ba08b6921994e152394a2031cfdbe560d0e..d6f764447041cd3472ec12040b40e74ec7cd485d 100644 (file)
@@ -1,6 +1,8 @@
 # firewall definitions for physical servers
 class firewall(
-  $local_net = hiera('nodo::firewall::local_net',              false),
+  $local_net     = hiera('nodo::firewall::local_net',     false),
+  $in_bandwidth  = hiera('nodo::firewall::in_bandwidth',  '2mbit'),
+  $out_bandwidth = hiera('nodo::firewall::out_bandwidth', '2mbit')
 ) {
   class { 'shorewall': }
 
@@ -155,16 +157,6 @@ 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  => "$in_bandwidth",
     out_bandwidth => "$out_bandwidth",