1 |
#TODO: |
2 |
# - add the creation of the user 'blog' in puppet |
3 |
# - add the user 'blog' to the 'apache' group (usermod -a -G apache blog) |
4 |
class blog { |
5 |
include apache::mod_php |
6 |
include mysql |
7 |
|
8 |
package { ['wget','php-mysql']: |
9 |
ensure => installed |
10 |
} |
11 |
|
12 |
file { "check_new-blog-post": |
13 |
path => "/usr/local/bin/check_new-blog-post.sh", |
14 |
ensure => present, |
15 |
owner => blog, |
16 |
group => blog, |
17 |
mode => 755, |
18 |
content => template("blog/check_new-blog-post.sh") |
19 |
} |
20 |
|
21 |
apache::vhost_other_app { "blog-test.$domain": |
22 |
vhost_file => "blog/01_blogs_vhosts.conf", |
23 |
} |
24 |
|
25 |
file { "/var/lib/blog": |
26 |
ensure => directory, |
27 |
owner => blog, |
28 |
group => blog, |
29 |
mode => 644, |
30 |
} |
31 |
|
32 |
file { "/var/www/html/blog.mageia.org": |
33 |
ensure => directory, |
34 |
owner => apache, |
35 |
group => blog, |
36 |
mode => 644, |
37 |
} |
38 |
|
39 |
cron { blog: |
40 |
user => blog, |
41 |
minute => '*/15', |
42 |
command => "/usr/local/bin/check_new-blog-post.sh", |
43 |
require => File["check_new-blog-post"] |
44 |
} |
45 |
} |