]> git.donarmstrong.com Git - dsa-puppet.git/blob - manifests/site.pp
move logic out of main manifest
[dsa-puppet.git] / manifests / site.pp
1 Package {
2         require => File['/etc/apt/apt.conf.d/local-recommends']
3 }
4
5 File {
6         owner  => root,
7         group  => root,
8         mode   => '0444',
9         ensure => file,
10 }
11
12 Exec {
13         path => '/usr/bin:/usr/sbin:/bin:/sbin'
14 }
15
16 Service {
17         hasrestart => true,
18         hasstatus  => true,
19 }
20
21 node default {
22         include site
23         include munin
24         include syslog-ng
25         include sudo
26         include ssh
27         include debian-org
28         include monit
29         include ntp
30         include ntpdate
31         include ssl
32         include motd
33         include hardware
34         include nagios::client
35         include resolv
36
37         if $::hostname in [pasquini,tristano] {
38                 include ganeti2
39         }
40
41         if $::kernel == Linux {
42                 include linux
43         } elsif $::kernel == 'GNU/kFreeBSD' {
44                 include kfreebsd
45         }
46
47         if $::kvmdomain {
48                 include acpi
49         }
50
51         if $::mta == 'exim4' {
52                 if getfromhash($site::nodeinfo, 'heavy_exim') {
53                         include exim::mx
54                 } else {
55                         include exim
56                 }
57         } elsif $::hostname == 'bendel' {
58                 include postfix
59         }
60
61         if $::lsbdistcodename != 'lenny' {
62                 include unbound
63         }
64
65         if getfromhash($site::nodeinfo, 'puppetmaster') {
66                 include puppetmaster
67         }
68
69         if getfromhash($site::nodeinfo, 'muninmaster') {
70                 include munin::master
71         }
72
73         if getfromhash($site::nodeinfo, 'nagiosmaster') {
74                 include nagios::server
75         }
76
77         if getfromhash($site::nodeinfo, 'buildd') {
78                 include buildd
79         }
80
81         if $::hostname in [chopin,franck,morricone,bizet] {
82                 include roles::dakmaster
83         }
84
85         if getfromhash($site::nodeinfo, 'apache2_security_mirror') {
86                 include roles::security_mirror
87         }
88
89         if getfromhash($site::nodeinfo, 'apache2_www_mirror') {
90                 include roles::www_mirror
91         }
92
93         if getfromhash($site::nodeinfo, 'apache2_backports_mirror') {
94                 include roles::backports_mirror
95         }
96
97         if getfromhash($site::nodeinfo, 'apache2_ftp-upcoming_mirror') {
98                 include roles::ftp-upcoming_mirror
99         }
100
101         if $::apache2 {
102                 include apache2
103         }
104
105         if $::rsyncd {
106                 include rsyncd-log
107         }
108
109         if $::hostname in [ravel,senfl,orff,draghi,diamond] {
110                 include named::authoritative
111         } elsif $::hostname in [geo1,geo2,geo3] {
112                 include named::geodns
113         } elsif $::hostname == 'liszt' {
114                 include named::recursor
115         }
116
117         if $::hostname in [diabelli,nono,spohr] {
118                 include dacs
119         }
120
121         if $::hostname in [beethoven,duarte,spohr,stabile] {
122                 include nfs-server
123         }
124
125         if $::brokenhosts {
126                 include hosts
127         }
128
129         if $::portforwarder_user_exists {
130                 include portforwarder
131         }
132
133         include samhain
134
135         if $::hostname in [chopin,geo3,soler,wieck] {
136                 include debian-org::radvd
137         }
138
139         if ($::postgres84 or $::postgres90) {
140                 include postgres
141         }
142
143         if $::spamd {
144                 munin::check { 'spamassassin': }
145         }
146
147         if $::hostname in [chopin,franck,kassia,klecker,morricone,ravel,bizet] {
148                 include vsftpd
149         }
150 }