1 |
class blog { |
2 |
|
3 |
user { "blog": |
4 |
groups => apache, |
5 |
comment => "User running cron jobs for blog", |
6 |
ensure => present, |
7 |
managehome => true, |
8 |
home => "/var/lib/blog", |
9 |
} |
10 |
|
11 |
package { ['wget','php-mysql']: |
12 |
ensure => installed |
13 |
} |
14 |
|
15 |
file { "check_new-blog-post": |
16 |
path => "/usr/local/bin/check_new-blog-post.sh", |
17 |
ensure => present, |
18 |
owner => root, |
19 |
group => root, |
20 |
mode => 755, |
21 |
content => template("blog/check_new-blog-post.sh") |
22 |
} |
23 |
|
24 |
cron { blog: |
25 |
user => blog, |
26 |
minute => '*/15', |
27 |
command => "/usr/local/bin/check_new-blog-post.sh", |
28 |
require => File["check_new-blog-post"] |
29 |
} |
30 |
|
31 |
include apache::mod_php |
32 |
include mysql |
33 |
apache::vhost_other_app { "blog-test.$domain": |
34 |
vhost_file => "blog/blogs_vhosts.conf", |
35 |
} |
36 |
|
37 |
file { "/var/www/html/blog.$domain": |
38 |
ensure => directory, |
39 |
owner => blog, |
40 |
# FIXME is the group created by puppet ? |
41 |
group => blog, |
42 |
mode => 644, |
43 |
} |
44 |
} |