diff options
Diffstat (limited to 'manifests/master')
-rw-r--r-- | manifests/master/debian.pp | 30 |
1 files changed, 23 insertions, 7 deletions
diff --git a/manifests/master/debian.pp b/manifests/master/debian.pp index 5748683..87772c5 100644 --- a/manifests/master/debian.pp +++ b/manifests/master/debian.pp @@ -1,16 +1,32 @@ # debian master class puppet::master::debian inherits puppet::master::package { - if $puppet::master::mode != 'passenger' { - Service['puppetmaster'] { hasstatus => true, hasrestart => true } + if $puppet::master::mode == 'passenger' { + File['/etc/default/puppetmaster'] { + content => "# This file is managed by Puppet.\n\n# Running in passenger mode.\nSTART=no", + notify => Exec['stop puppetmaster service'], + } + exec { 'stop puppetmaster service': + command => 'service puppetmaster stop', + onlyif => 'service puppetmaster status', + refreshonly => true, + } + } else { + File['/etc/default/puppetmaster'] { + source => ["puppet:///modules/site_puppet/master/debian/${::fqdn}/puppetmaster", + "puppet:///modules/site_puppet/master/debian/${::domain}/puppetmaster", + 'puppet:///modules/site_puppet/master/debian/puppetmaster', + 'puppet:///modules/puppet/master/debian/puppetmaster' ], + } + Service['puppetmaster'] { + hasstatus => true, + hasrestart => true, + require +> File['/etc/default/puppetmaster'], + subscribe +> File['/etc/default/puppetmaster'], + } } file { '/etc/default/puppetmaster': - source => ["puppet:///modules/site_puppet/master/debian/${::fqdn}/puppetmaster", - "puppet:///modules/site_puppet/master/debian/${::domain}/puppetmaster", - 'puppet:///modules/site_puppet/master/debian/puppetmaster', - 'puppet:///modules/puppet/master/debian/puppetmaster' ], - notify => Service[puppetmaster], owner => root, group => 0, mode => '0644'; |