diff options
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/puppetmasterd.pp | 55 |
1 files changed, 28 insertions, 27 deletions
diff --git a/manifests/puppetmasterd.pp b/manifests/puppetmasterd.pp index c0474fe..a13070c 100644 --- a/manifests/puppetmasterd.pp +++ b/manifests/puppetmasterd.pp @@ -40,36 +40,37 @@ class puppetmasterd { notify => Service['puppetmaster'], } - if $puppetmaster_servertype == 'mongrel' { - if !defined(Package["mongrel"]) { - package { "mongrel": - ensure => installed, + case $puppetmaster_servertype { + 'mongrel': { + case defined(Package["mongrel"]) { + false: { package { "mongrel": ensure => installed, } } + } + + service { "puppetmaster": + enable => true, + ensure => running, + hasrestart => true, + require => [ Package['puppetmaster'], Package['mongrel'] ], } - } - - service { "puppetmaster": - enable => true, - ensure => running, - hasrestart => true, - require => Package['puppetmaster'], Package['mongrel'], - } - nginx::puppetmaster::proxy{ "puppet.$domain": - $worker_processes => 4, - $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", ], + nginx::puppetmaster::proxy{ "puppet.$domain": + worker_processes => 4, + 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" ], + } } - } else { - service { "puppetmaster": - enable => true, - ensure => running, - hasrestart => true, - require => Package['puppetmaster'], + default: { + service { "puppetmaster": + enable => true, + ensure => running, + hasrestart => true, + require => Package['puppetmaster'], + } } } |