summaryrefslogtreecommitdiff
path: root/manifests/master.pp
blob: af7794b8e5932e9c7292439e6d2912a178fbfdf2 (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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# manifests/puppetmaster.pp
class puppet::master(
  $config = '/etc/puppet/puppet.conf',
  $fileserver = '/etc/puppet/fileserver.conf',
  $http_compression = false,
  $cleanup_clientbucket = false,
  $cron_time = false,
  $ensure_version = 'installed',
  $ensure_facter_version = 'installed',
  $lastruncheck_cron = '40 10 * * *',
  $lastruncheck_ignorehosts = '',
  $lastruncheck_timeout = '',
  $lastruncheck_additionaloptions = '',
  $mode = 'webrick',
  $cleanup_reports = '30',
  $reports_dir = '/var/lib/puppet/reports',
  $shorewall_puppetmaster = "domain.${::domain}",
  $shorewall_puppetmaster_port = 8140,
  $shorewall_puppetmaster_signport = 8141,
  $manage_munin = false
) {
  if $cron_time {
    class{'puppet::cron':
      config => $config,
      http_compression => $http_compression,
      cleanup_clientbucket => $cleanup_clientbucket,
      cron_time => $cron_time,
      ensure_version => $ensure_version,
      ensure_facter_version => $ensure_facter_version,
      shorewall_puppetmaster => $shorewall_puppetmaster,
      shorewall_puppetmaster_port => $shorewall_puppetmaster_port,
      shorewall_puppetmaster_signport => $shorewall_puppetmaster_signport,
    }
  } else {
    class{'puppet':
      config => $config,
      http_compression => $http_compression,
      cleanup_clientbucket => $cleanup_clientbucket,
      ensure_version => $ensure_version,
      ensure_facter_version => $ensure_facter_version,
    }
  }
  case $::operatingsystem {
    debian: { include puppet::master::debian }
    centos: { include puppet::master::centos }
    default: {
      case $::kernel {
        linux: { include puppet::master::linux }
      }
    }
  }

  include puppet::master::base


  if $puppet::master::lastruncheck_cron {
    include puppet::master::checklastrun
  } else {
    include puppet::master::checklastrun::disable
  }

  if $puppet::master::mode == 'passenger' {
    include puppet::master::passenger
  } elsif $puppet::master::mode == 'cluster' {
    include puppet::master::cluster
  }

  if $puppet::master::cleanup_reports {
    include puppet::master::cleanup_reports
  } else {
    include puppet::master::cleanup_reports::disable
  }

  if $shorewall_puppetmaster {
    include shorewall::rules::puppet::master
  }

  if $manage_munin {
    include puppet::master::munin
  }
}