summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorJerome Charaoui <jcharaoui@cmaisonneuve.qc.ca>2015-05-06 13:07:51 -0400
committerJerome Charaoui <jcharaoui@cmaisonneuve.qc.ca>2015-05-06 13:07:51 -0400
commit0793464ecc098de05909e7d90b3c7d601988779f (patch)
treeb177ed8b068aad8facce90be46f4849ac4eb8cfe /manifests
parente8fc260c5adc29d7c62daa46fb0bf6c6655147ad (diff)
Fix /etc/default/puppetmaster on Debian when using mode => passenger
Diffstat (limited to 'manifests')
-rw-r--r--manifests/master/debian.pp30
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';