summaryrefslogtreecommitdiff
path: root/manifests/puppetmaster/base.pp
blob: 6f9bdc749ba084805c9122ebab37b85205766281 (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
33
34
35
36
37
class puppet::puppetmaster::base inherits puppet::base {
  File[puppet_config]{
    source => [ "puppet:///modules/site-puppet/master/puppet.conf",
                "puppet:///modules/puppet/master/puppet.conf" ],
  }

  if !$puppet_fileserverconfig { $puppet_fileserverconfig  = '/etc/puppet/fileserver.conf' }

  file { "$puppet_fileserverconfig":
    source => [ "puppet:///modules/site-puppet/master/${fqdn}/fileserver.conf",
                "puppet:///modules/site-puppet/master/fileserver.conf",
                "puppet:///modules/puppet/master/fileserver.conf" ],
    owner => root, group => puppet, mode => 640;
  } 

  if $puppetmaster_storeconfigs {
    include puppet::puppetmaster::storeconfigs
  }


  if $puppetmaster_mode == 'passenger' {
    include puppet::puppetmaster::pasenger
    File[$puppet_fileserverconfig]{
      notify => Exec['notify_passenger_puppetmaster'],
    }
    File[puppet_config]{
      notify => Exec['notify_passenger_puppetmaster'],
    }
  } else {
    File[$puppet_fileserverconfig]{
      notify => Service[puppetmaster],
    }
    File[puppet_config]{
      notify => Service[puppetmaster],
    }
  }
}