]> gitweb.fluxo.info Git - puppet-nginx.git/commitdiff
Removing nginx::puppetmaster::proxy
authorSilvio Rhatto <rhatto@riseup.net>
Wed, 17 Feb 2010 22:22:41 +0000 (20:22 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Wed, 17 Feb 2010 22:22:41 +0000 (20:22 -0200)
manifests/init.pp

index d2bafc604fec8cef014b55938fa581f612a2e7c8..a5c88614a7cf62ac9884c6e6930fa52785ec00e1 100644 (file)
@@ -135,39 +135,46 @@ class nginx inherits nginx::base {
 
 class nginx::puppetmaster inherits nginx::base {
 
-  define proxy($name = $domain, $worker_processes = 4,
-               $worker_connections = 1024,
-               $ssl_port = 8140, $non_ssl_port = 8141,
-               $puppetmaster_servers = [ "127.0.0.1:18140" ]) {
-
-    file { "/etc/nginx/conf.d/puppetmaster.conf":
-      content => template("nginx/puppetmaster.conf.erb"),
-      owner   => "root",
-      group   => "root",
-      mode    => 0644,
-      ensure  => present,
-      notify  => Service["nginx"],
-    }
+  $worker_processes = $puppetmaster_puppetmasters ? {
+    ''      => 4,
+    default => $puppetmaster_puppetmasters,
+  }
 
-    nginx::base::site { "puppetmaster":
-      ensure  => present,
-      source  => 'template',
-      require => File['/etc/nginx/conf.d/puppetmaster.conf'],
-    }
+  $worker_connections   = 1024,
+  $ssl_port             = 8140,
+  $non_ssl_port         = 8141,
+  $puppetmaster_servers = [ "127.0.0.1:18140",
+                            "127.0.0.1:18141",
+                            "127.0.0.1:18142",
+                            "127.0.0.1:18143" ],
 
-    # We don't want nginx to listen at port 80
-    nginx::base::site { "default":
-      source => 'none',
-      ensure => absent,
-    }
+  file { "/etc/nginx/conf.d/puppetmaster.conf":
+    content => template("nginx/puppetmaster.conf.erb"),
+    owner   => "root",
+    group   => "root",
+    mode    => 0644,
+    ensure  => present,
+    notify  => Service["nginx"],
+  }
 
-    file { "/etc/nginx/nginx.conf":
-      content => template("nginx/nginx.conf.erb"),
-      owner   => "root",
-      group   => "root",
-      mode    => 0644,
-      ensure  => present,
-      notify  => Service["nginx"],
-    }
+  nginx::base::site { "puppetmaster":
+    ensure  => present,
+    source  => 'template',
+    require => File['/etc/nginx/conf.d/puppetmaster.conf'],
+  }
+
+  # We don't want nginx to listen at port 80
+  nginx::base::site { "default":
+    source => 'none',
+    ensure => absent,
+  }
+
+  file { "/etc/nginx/nginx.conf":
+    content => template("nginx/nginx.conf.erb"),
+    owner   => "root",
+    group   => "root",
+    mode    => 0644,
+    ensure  => present,
+    notify  => Service["nginx"],
   }
 }