]> git.donarmstrong.com Git - dsa-puppet.git/blob - manifests/site.pp
some readability cleanup
[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    => 444,
9     ensure  => file,
10 }
11
12 Exec {
13     path => "/usr/bin:/usr/sbin:/bin:/sbin"
14 }
15
16 node default {
17     $localinfo = yamlinfo('*', "/etc/puppet/modules/debian-org/misc/local.yaml")
18     $nodeinfo  = nodeinfo($::fqdn, "/etc/puppet/modules/debian-org/misc/local.yaml")
19     $allnodeinfo = allnodeinfo("sshRSAHostKey ipHostNumber", "purpose mXRecord physicalHost purpose")
20     notice( sprintf("hoster for %s is %s", $::fqdn, getfromhash($nodeinfo, 'hoster', 'name') ) )
21
22     include munin-node
23     include syslog-ng
24     include sudo
25     include ssh
26     include debian-org
27     include monit
28     include apt-keys
29     include ntp
30     include ntpdate
31     include ssl
32     include motd
33
34     case $::hostname {
35         finzi,fano,fasch,field:    { include kfreebsd }
36     }
37
38     if $::smartarraycontroller {
39         include debian-proliant
40     }
41
42     if $::productname == 'PowerEdge 2850' {
43         include megactl
44     }
45
46     if $::mptraid {
47         include raidmpt
48     }
49
50     if $::kvmdomain {
51         include acpi
52     }
53
54     if $::mta == 'exim4' {
55         case getfromhash($nodeinfo, 'heavy_exim') {
56              true:  { include exim::mx }
57              default: { include exim }
58         }
59     }
60
61     if getfromhash($nodeinfo, 'puppetmaster') {
62         include puppetmaster
63     }
64
65     if getfromhash($nodeinfo, 'muninmaster') {
66         include munin-node::master
67     }
68
69     case getfromhash($nodeinfo, 'nagiosmaster') {
70         true:    { include nagios::server }
71         default: { include nagios::client }
72     }
73
74     if $::apache2 {
75          if getfromhash($nodeinfo, 'apache2_security_mirror') {
76                 include apache2::security_mirror
77          }
78          if getfromhash($nodeinfo, 'apache2_www_mirror') {
79                 include apache2::www_mirror
80          }
81          if getfromhash($nodeinfo, 'apache2_backports_mirror') {
82                 include apache2::backports_mirror
83          }
84          if getfromhash($nodeinfo, 'apache2_ftp-upcoming_mirror') {
85                 include apache2::ftp-upcoming_mirror
86          }
87          include apache2
88     }
89
90     if $::rsyncd {
91         include rsyncd-log
92     }
93
94
95     if getfromhash($nodeinfo, 'buildd') {
96         include buildd
97     }
98
99     case $::hostname {
100         ravel,senfl,orff,draghi,diamond: { include named::authoritative }
101         geo1,geo2,geo3:                  { include named::geodns }
102         liszt:                           { include named::recursor }
103     }
104
105     case $::hostname {
106         franck,master,lobos,samosa,spohr,widor:   { include unbound }
107     }
108
109     if $::lsbdistcodename != 'lenny' {
110         include unbound
111     }
112
113     include resolv
114
115     if $::kernel == 'Linux' {
116         include ferm
117         include ferm::per-host
118     }
119
120     case $::hostname {
121         diabelli,nono,spohr: { include dacs }
122     }
123
124     case $::hostname {
125         beethoven,duarte,spohr,stabile: {
126             include nfs-server
127         }
128     }
129
130     if $::brokenhosts {
131         include hosts
132     }
133
134     if $::portforwarder_user_exists {
135         include portforwarder
136     }
137
138     include samhain
139
140     case $::hostname {
141         byrd,schuetz,tchaikovsky,draghi,quantz,lamb,locke,rautavaara,rietz: {
142             include krb
143         }
144     }
145
146     case $::hostname {
147         chopin,geo3,soler,wieck: {
148             include debian-radvd
149         }
150     }
151
152     if $::kernel == 'Linux' {
153         include entropykey
154     }
155
156     if $::postgres84 == "true" {
157         include postgres
158     } elsif $::postgres90 == "true" {
159         include postgres
160     }
161 }
162
163 # vim:set et:
164 # vim:set sts=4 ts=4:
165 # vim:set shiftwidth=4: