aboutsummaryrefslogtreecommitdiffstats
path: root/modules/blog/manifests/init.pp
blob: 6bdaa33fef41428382f0ade1e59d0149e4510eac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
class blog {
    user { "blog":
        groups => apache,
        comment => "This user is used for blog.mageia.org",
        ensure => present,
        managehome => true,
    }

    include apache::mod_php
    include mysql
    apache::vhost_other_app { "blog-test.$domain":
        vhost_file => "blog/01_blogs_vhosts.conf",
    }

    package { ['wget','php-mysql']:
        ensure => installed
    }

    file { "/var/lib/blog":
        ensure => directory,
        owner => blog,
        group => blog,
        mode => 644,
    }

    file { "check_new-blog-post":
        path => "/usr/local/bin/check_new-blog-post.sh",
        ensure => present,
        owner => blog,
        group => blog,
        mode => 755,
        content => template("blog/check_new-blog-post.sh")
    }

    file { "/var/www/html/blog.mageia.org":
	ensure => directory,
	owner => blog,
	group => blog,
	mode => 644,
    }
    
    cron { blog:
        user => blog,
        minute => '*/15',
        command => "/usr/local/bin/check_new-blog-post.sh",
        require => File["check_new-blog-post"]
    }
}