]> git.donarmstrong.com Git - dsa-puppet.git/blob - modules/dacs/manifests/init.pp
fix log directory permissions, add dependency to libapache2-mod-dacs
[dsa-puppet.git] / modules / dacs / manifests / init.pp
1 class dacs {
2     package {
3         "dacs": ensure => installed;
4         "libapache2-mod-dacs": ensure => installed;
5     }
6
7     file {
8         "/var/log/dacs":
9              ensure  => directory,
10              owner   => root
11              group   => www-data,
12              mode    => 770,
13              purge   => true
14              ;
15         "/etc/dacs/federations":
16              require => Package["libapache2-mod-dacs"],
17              ensure  => directory,
18              owner   => root,
19              group   => www-data,
20              mode    => 750,
21              purge   => true
22              ;
23
24         "/etc/dacs/federations/debian.org/":
25              require => Package["libapache2-mod-dacs"],
26              ensure  => directory,
27              owner   => root,
28              group   => www-data,
29              mode    => 750,
30              purge   => true
31              ;
32
33         "/etc/dacs/federations/debian.org/DEBIAN":
34              require => Package["libapache2-mod-dacs"],
35              ensure  => directory,
36              owner   => root,
37              group   => www-data,
38              mode    => 750,
39              purge   => true
40              ;
41
42         "/etc/dacs/federations/debian.org/DEBIAN/acls":
43              require => Package["libapache2-mod-dacs"],
44              ensure  => directory,
45              owner   => root,
46              group   => www-data,
47              mode    => 750,
48              purge   => true
49              ;
50         
51         "/etc/dacs/federations/debian.org/DEBIAN/groups":
52              require => Package["libapache2-mod-dacs"],
53              ensure  => directory,
54              owner   => root,
55              group   => www-data,
56              mode    => 750,
57              purge   => true
58              ;
59
60         "/etc/dacs/federations/debian.org/DEBIAN/groups/DACS":
61              require => Package["libapache2-mod-dacs"],
62              ensure  => directory,
63              owner   => root,
64              group   => www-data,
65              mode    => 750,
66              purge   => true
67              ;
68
69         "/etc/dacs/federations/site.conf":
70              require => Package["libapache2-mod-dacs"],
71              source  => [ "puppet:///modules/dacs/per-host/$fqdn/site.conf",
72                           "puppet:///modules/dacs/common/site.conf" ],
73              mode    => 640,
74              owner   => root,
75              group   => www-data
76              ;
77
78         "/etc/dacs/federations/debian.org/DEBIAN/dacs.conf":
79              require => Package["libapache2-mod-dacs"],
80              source  => [ "puppet:///modules/dacs/per-host/$fqdn/dacs.conf",
81                           "puppet:///modules/dacs/common/dacs.conf" ],
82              mode    => 640,
83              owner   => root,
84              group   => www-data
85              ;
86
87         "/etc/dacs/federations/debian.org/DEBIAN/acls/revocations":
88              require => Package["libapache2-mod-dacs"],
89              source  => [ "puppet:///modules/dacs/per-host/$fqdn/revocations",
90                           "puppet:///modules/dacs/common/revocations" ],
91              mode    => 640,
92              owner   => root,
93              group   => www-data
94              ;
95
96         "/etc/dacs/federations/debian.org/DEBIAN/groups/DACS/jurisdictions.grp":
97              require => Package["libapache2-mod-dacs"],
98              source  => [ "puppet:///modules/dacs/per-host/$fqdn/jurisdictions.grp",
99                           "puppet:///modules/dacs/common/jurisdictions.grp" ],
100              mode    => 640,
101              owner   => root,
102              group   => www-data
103              ;
104
105         "/etc/dacs/federations/debian.org/DEBIAN/acls/acl-noauth.0":
106              require => Package["libapache2-mod-dacs"],
107              source  => [ "puppet:///modules/dacs/per-host/$fqdn/acl-noauth.0",
108                           "puppet:///modules/dacs/common/acl-noauth.0" ],
109              mode    => 640,
110              owner   => root,
111              group   => www-data,
112              notify  => Exec["dacsacl"]
113              ;
114
115         "/etc/dacs/federations/debian.org/DEBIAN/acls/acl-private.0":
116              require => Package["libapache2-mod-dacs"],
117              source  => [ "puppet:///modules/dacs/per-host/$fqdn/acl-private.0",
118                           "puppet:///modules/dacs/common/acl-private.0" ],
119              mode    => 640,
120              owner   => root,
121              group   => www-data,
122              notify  => Exec["dacsacl"]
123              ;
124
125         "/etc/dacs/federations/debian.org/federation_keyfile":
126              require => Package["libapache2-mod-dacs"],
127              source  => "puppet:///modules/dacs/private/debian.org_federation_keyfile",
128              mode    => 640,
129              owner   => root,
130              group   => www-data
131              ;
132
133         "/etc/dacs/federations/debian.org/DEBIAN/jurisdiction_keyfile":
134              require => Package["libapache2-mod-dacs"],
135              source  => "puppet:///modules/dacs/private/DEBIAN_jurisdiction_keyfile",
136              mode    => 640,
137              owner   => root,
138              group   => www-data
139              ;
140
141     }
142
143     exec {
144         "dacsacl":
145             command     => "dacsacl -sc /etc/dacs/federations/site.conf -c /etc/dacs/federations/debian.org/DEBIAN/dacs.conf -uj DEBIAN && chown root:www-data /etc/dacs/federations/debian.org/DEBIAN/acls/INDEX",
146             refreshonly => true,
147     }
148
149
150 }
151 # vim:set et:
152 # vim:set sts=4 ts=4:
153 # vim:set shiftwidth=4: