]> gitweb.fluxo.info Git - puppet-nodo.git/commitdiff
Introducing $puppetmaster_port and $puppetmaster_nonssl_port
authorSilvio Rhatto <rhatto@riseup.net>
Thu, 3 Jun 2010 17:34:49 +0000 (14:34 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Thu, 3 Jun 2010 17:34:49 +0000 (14:34 -0300)
manifests/vserver.pp

index 6e851ed25857e66a269a4ee7e10db84754a9080e..17be6c3abd6e14fbaea438e3cd5e0cff77df326b 100644 (file)
@@ -3,6 +3,14 @@ class nodo::vserver inherits nodo {
   include timezone
   include syslog-ng::vserver
 
+  case $puppetmaster_port {
+    '': { $puppetmaster_port = "8140" }
+  }
+
+  case $puppetmaster_nonssl_port {
+    '': { $puppetmaster_nonssl_port = "8141" }
+  }
+
   backupninja::sys { "sys":
     ensure     => present,
     partitions => false,
@@ -181,9 +189,9 @@ class nodo::vserver inherits nodo {
           shorewall::rule { 'puppetmaster-1':
             action          => 'DNAT',
             source          => 'net',
-            destination     => "fw:192.168.0.$context:8140",
+            destination     => "fw:192.168.0.$context:$puppetmaster_port",
             proto           => 'tcp',
-            destinationport => '8140',
+            destinationport => "$puppetmaster_port",
             ratelimit       => '-',
             order           => '700',
           }
@@ -191,9 +199,9 @@ class nodo::vserver inherits nodo {
           shorewall::rule { 'puppetmaster-2':
             action          => 'DNAT',
             source          => 'net',
-            destination     => "fw:192.168.0.$context:8140",
+            destination     => "fw:192.168.0.$context:$puppetmaster_port",
             proto           => 'udp',
-            destinationport => '8140',
+            destinationport => "$puppetmaster_port",
             ratelimit       => '-',
             order           => '701',
           }
@@ -201,9 +209,9 @@ class nodo::vserver inherits nodo {
           shorewall::rule { 'puppetmaster-3':
             action          => 'DNAT',
             source          => '$FW',
-            destination     => "fw:192.168.0.$context:8140",
+            destination     => "fw:192.168.0.$context:$puppetmaster_port",
             proto           => 'tcp',
-            destinationport => '8140',
+            destinationport => "$puppetmaster_port",
             originaldest    => "$ipaddress",
             ratelimit       => '-',
             order           => '702',
@@ -212,9 +220,9 @@ class nodo::vserver inherits nodo {
           shorewall::rule { 'puppetmaster-4':
             action          => 'DNAT',
             source          => '$FW',
-            destination     => "fw:192.168.0.$context:8140",
+            destination     => "fw:192.168.0.$context:$puppetmaster_port",
             proto           => 'udp',
-            destinationport => '8140',
+            destinationport => "$puppetmaster_port",
             originaldest    => "$ipaddress",
             ratelimit       => '-',
             order           => '703',
@@ -223,9 +231,9 @@ class nodo::vserver inherits nodo {
           shorewall::rule { 'puppetmaster-5':
             action          => 'DNAT',
             source          => 'net',
-            destination     => "fw:192.168.0.$context:8141",
+            destination     => "fw:192.168.0.$context:$puppetmaster_nonssl_port",
             proto           => 'tcp',
-            destinationport => '8141',
+            destinationport => "$puppetmaster_nonssl_port",
             ratelimit       => '-',
             order           => '704',
           }
@@ -233,9 +241,9 @@ class nodo::vserver inherits nodo {
           shorewall::rule { 'puppetmaster-6':
             action          => 'DNAT',
             source          => 'net',
-            destination     => "fw:192.168.0.$context:8141",
+            destination     => "fw:192.168.0.$context:$puppetmaster_nonssl_port",
             proto           => 'udp',
-            destinationport => '8141',
+            destinationport => "$puppetmaster_nonssl_port",
             ratelimit       => '-',
             order           => '705',
           }
@@ -243,9 +251,9 @@ class nodo::vserver inherits nodo {
           shorewall::rule { 'puppetmaster-7':
             action          => 'DNAT',
             source          => '$FW',
-            destination     => "fw:192.168.0.$context:8141",
+            destination     => "fw:192.168.0.$context:$puppetmaster_nonssl_port",
             proto           => 'tcp',
-            destinationport => '8141',
+            destinationport => "$puppetmaster_nonssl_port",
             originaldest    => "$ipaddress",
             ratelimit       => '-',
             order           => '706',
@@ -254,9 +262,9 @@ class nodo::vserver inherits nodo {
           shorewall::rule { 'puppetmaster-8':
             action          => 'DNAT',
             source          => '$FW',
-            destination     => "fw:192.168.0.$context:8141",
+            destination     => "fw:192.168.0.$context:$puppetmaster_nonssl_port",
             proto           => 'udp',
-            destinationport => '8141',
+            destinationport => "$puppetmaster_nonssl_port",
             originaldest    => "$ipaddress",
             ratelimit       => '-',
             order           => '707',