summaryrefslogtreecommitdiff
path: root/manifests/master/mongrel.pp
blob: 5cdf5510d3cc1aaafa190112229caca66cd95ec2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# handles puppetmasterd service
class puppet::master::mongrel {

  # Include nginx
  include nginx::puppetmaster

  case defined(Package["mongrel"]) {
    false: { package { "mongrel": ensure => installed, } }
  } 

  package { "puppetmaster":
    ensure => installed,
  }

  service { "puppetmaster":
    enable     => true,
    ensure     => running,
    hasrestart => true,
    pattern    => 'puppet master',
    require    => [ Package['puppetmaster'], Package['mongrel'], Service['nginx'] ],
  }

  # restart the master from time to time to avoid memory problems
  # thanks to https://labs.riseup.net/code/projects/shared-puppet
  file { "/etc/cron.d/puppetmaster":
    source => "puppet:///modules/puppet/cron.d/puppetmaster",
    owner  => root,
    group  => root,
    mode   => 0644;
  }

}