summaryrefslogtreecommitdiff
path: root/manifests/puppetmaster/linux.pp
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2010-08-06 22:10:39 +0200
committermh <mh@immerda.ch>2010-08-06 22:11:58 +0200
commit4036ecf691babf80d859b68865e66cea0008a238 (patch)
tree9fa165d448b560077af447c1acf9132a1bb8957c /manifests/puppetmaster/linux.pp
parentdcdf341af2b32969c47bef5939e34952a6fc7642 (diff)
cleanup 'if defined' code smell
A new variable $puppetmaster_mode have been introduced, which should later be replaced by a class variable.
Diffstat (limited to 'manifests/puppetmaster/linux.pp')
-rw-r--r--manifests/puppetmaster/linux.pp16
1 files changed, 4 insertions, 12 deletions
diff --git a/manifests/puppetmaster/linux.pp b/manifests/puppetmaster/linux.pp
index 062d907..3d36f75 100644
--- a/manifests/puppetmaster/linux.pp
+++ b/manifests/puppetmaster/linux.pp
@@ -1,17 +1,9 @@
class puppet::puppetmaster::linux inherits puppet::linux {
- if defined (puppet::puppetmaster::passenger) {
- service{'puppetmaster':
- ensure => running,
- #name => apache2,
- #enable => true,
- pattern => 'apache2',
- hasstatus => true,
- start => '/etc/init.d/apache2 start',
- stop => '/etc/init.d/apache2 start',
- restart => '/etc/init.d/apache2 restart',
- status => 'pgrep apache2',
- require => [ Package[puppet] ],
+ if $puppetmaster_mode == 'passenger' {
+ exec{'notify_passenger_puppetmaster':
+ refreshonly => true,
+ command => 'touch /etc/puppet/rack/tmp/restart.txt && sleep 1 && rm /etc/puppet/rack/tmp/restart.txt',
}
} else {
service{'puppetmaster':