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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1267 - (hide annotations) (download)
Thu Mar 3 18:01:31 2011 UTC (13 years ago) by dams
File size: 1510 byte(s)
update init.pp to split script in different classes
1 dams 279 class blog {
2 misc 1040
3 dams 1267 class base {
4     user { "blog":
5 dams 1005 groups => apache,
6 dams 1259 comment => "Mageia Blog",
7 dams 1005 ensure => present,
8     managehome => true,
9 misc 1041 home => "/var/lib/blog",
10 dams 1267 }
11 dams 1005 }
12 dams 1267
13     class champagne inherits base {
14     package { ['wget','php-mysql']:
15     ensure => installed
16     }
17 dams 1005
18 dams 1267 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 misc 1043
27 dams 1267 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 misc 1043
34 dams 1267 include apache::mod_php
35 misc 1045
36 dams 1267 $blog_location = "/var/www/html/blog.$domain"
37     $blog_domain = "blog-test.$domain"
38 misc 1048
39 dams 1267 apache::vhost_base { "$blog_domain":
40     location => $blog_location,
41     content => template('blog/blogs_vhosts.conf'),
42     }
43 misc 1043
44 dams 1267 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 misc 1048
51 dams 1267 file { "$blog_location":
52     ensure => directory,
53     owner => blog,
54     group => apache,
55     mode => 644,
56     }
57 misc 1043 }
58 dams 143 }

  ViewVC Help
Powered by ViewVC 1.1.30