/[adm]/puppet/modules/blog/manifests/init.pp
ViewVC logotype

Contents of /puppet/modules/blog/manifests/init.pp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1331 - (show annotations) (download)
Fri Mar 18 18:26:21 2011 UTC (13 years, 1 month ago) by dams
File size: 2237 byte(s)
typo
1 class blog {
2
3 class base {
4 user { "blog":
5 groups => apache,
6 comment => "Mageia Blog",
7 ensure => present,
8 managehome => true,
9 home => "/var/lib/blog",
10 }
11 }
12
13 class files-bots inherits base {
14 package { ['wget','php-mysql']:
15 ensure => installed
16 }
17
18 file { "check_new-blog-post":
19 path => "/usr/local/bin/check_new-blog-post.sh",
20 ensure => present,
21 owner => root,
22 group => root,
23 mode => 755,
24 content => template("blog/check_new-blog-post.sh")
25 }
26
27 cron { blog:
28 user => blog,
29 minute => '*/15',
30 command => "/usr/local/bin/check_new-blog-post.sh",
31 require => [File["check_new-blog-post"], User['blog']],
32 }
33
34 include apache::mod_php
35
36 $blog_location = "/var/www/html/blog.$domain"
37 $blog_domain = "blog.$domain"
38
39 apache::vhost_base { "$blog_domain":
40 location => $blog_location,
41 content => template('blog/blogs_vhosts.conf'),
42 }
43
44 apache::vhost_base { "ssl_$blog_domain":
45 use_ssl => true,
46 vhost => $blog_domain,
47 location => $blog_location,
48 content => template('blog/blogs_vhosts.conf'),
49 }
50
51 file { "$blog_location":
52 ensure => directory,
53 owner => apache,
54 group => apache,
55 mode => 644,
56 }
57 }
58 class db_backup inherits base {
59 file { "/var/lib/blog/backup/db":
60 ensure => directory,
61 owner => root,
62 group => root,
63 mode => 644,
64 }
65
66 file { "backup_blog-db":
67 path => "/usr/local/bin/backup_blog-db.sh",
68 ensure => present,
69 owner => root,
70 group => root,
71 mode => 755,
72 content => template("blog/backup_blog-db.sh")
73 }
74
75 cron { root:
76 user => root,
77 day => '*/1',
78 hour => '23',
79 minute => '42',
80 command => "/usr/local/bin/backup_blog-db.sh",
81 require => [File["backup_blog-db"]],
82 }
83 }
84 }

  ViewVC Help
Powered by ViewVC 1.1.30