diff options
Diffstat (limited to 'modules/blog')
-rw-r--r-- | modules/blog/manifests/init.pp | 90 |
1 files changed, 47 insertions, 43 deletions
diff --git a/modules/blog/manifests/init.pp b/modules/blog/manifests/init.pp index 21941c91..647b868e 100644 --- a/modules/blog/manifests/init.pp +++ b/modules/blog/manifests/init.pp @@ -1,54 +1,58 @@ class blog { - user { "blog": + class base { + user { "blog": groups => apache, comment => "Mageia Blog", ensure => present, managehome => true, home => "/var/lib/blog", + } } - - package { ['wget','php-mysql']: - ensure => installed - } - - file { "check_new-blog-post": - path => "/usr/local/bin/check_new-blog-post.sh", - ensure => present, - owner => root, - group => root, - mode => 755, - content => template("blog/check_new-blog-post.sh") - } + + class champagne inherits base { + package { ['wget','php-mysql']: + ensure => installed + } + + file { "check_new-blog-post": + path => "/usr/local/bin/check_new-blog-post.sh", + ensure => present, + owner => root, + group => root, + mode => 755, + content => template("blog/check_new-blog-post.sh") + } - cron { blog: - user => blog, - minute => '*/15', - command => "/usr/local/bin/check_new-blog-post.sh", - require => [File["check_new-blog-post"], User['blog']], - } - - include apache::mod_php - - $blog_location = "/var/www/html/blog.$domain" - $blog_domain = "blog-test.$domain" - - apache::vhost_base { "$blog_domain": - location => $blog_location, - content => template('blog/blogs_vhosts.conf'), - } - - apache::vhost_base { "ssl_$blog_domain": - use_ssl => true, - vhost => $blog_domain, - location => $blog_location, - content => template('blog/blogs_vhosts.conf'), - } - - file { "$blog_location": - ensure => directory, - owner => blog, - group => apache, - mode => 644, + cron { blog: + user => blog, + minute => '*/15', + command => "/usr/local/bin/check_new-blog-post.sh", + require => [File["check_new-blog-post"], User['blog']], + } + + include apache::mod_php + + $blog_location = "/var/www/html/blog.$domain" + $blog_domain = "blog-test.$domain" + + apache::vhost_base { "$blog_domain": + location => $blog_location, + content => template('blog/blogs_vhosts.conf'), + } + + apache::vhost_base { "ssl_$blog_domain": + use_ssl => true, + vhost => $blog_domain, + location => $blog_location, + content => template('blog/blogs_vhosts.conf'), + } + + file { "$blog_location": + ensure => directory, + owner => blog, + group => apache, + mode => 644, + } } } |