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