]> git.donarmstrong.com Git - dsa-puppet.git/blob - modules/apache2/manifests/init.pp
So, if you require a package in a files block you also need to declare it
[dsa-puppet.git] / modules / apache2 / manifests / init.pp
1 class apache2 {
2         package {
3                 apache2: ensure => installed;
4         }
5
6         file {
7                 "/etc/apache2/conf.d/security":
8                         source  => [ "puppet:///apache2/per-host/$fqdn/etc/apache2/conf.d/security",
9                                      "puppet:///apache2/common/etc/apache2/conf.d/security" ],
10                         require => Package["apache2"],
11                         notify  => Exec["apache2 reload"];
12
13                 "/etc/apache2/sites-available/default-debian.org":
14                         source  => [ "puppet:///apache2/per-host/$fqdn/etc/apache2/sites-available/default-debian.org",
15                                      "puppet:///apache2/common/etc/apache2/sites-available/default-debian.org" ],
16                         require => Package["apache2"],
17                         notify  => Exec["apache2 reload"];
18                 "/srv/www/default.debian.org/htdocs":
19                         mode    => 755,
20                         ensure  => directory;
21                 "/srv/www/default.debian.org/htdocs/index.html":
22                         content => template("default-index.html");
23         }
24
25         exec { "apache2 reload":
26                 path        => "/etc/init.d:/usr/bin:/usr/sbin:/bin:/sbin",
27                 refreshonly => true,
28         }
29 }