summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2010-02-17 20:22:41 -0200
committerSilvio Rhatto <rhatto@riseup.net>2010-02-17 20:22:41 -0200
commit85af58119f219861b45cd894ea7e1fa57a012357 (patch)
tree5fedbcd6cb1cbc6a93f2b9ef02aa20241a6f4e12
parentf4f36da96cb1198cfa7d550e83c00f8a0059a892 (diff)
downloadpuppet-nginx-85af58119f219861b45cd894ea7e1fa57a012357.tar.gz
puppet-nginx-85af58119f219861b45cd894ea7e1fa57a012357.tar.bz2
Removing nginx::puppetmaster::proxy
-rw-r--r--manifests/init.pp69
1 files changed, 38 insertions, 31 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index d2bafc6..a5c8861 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -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"],
}
}