diff options
author | Damien Lallement <dams@mageia.org> | 2011-02-11 15:11:00 +0000 |
---|---|---|
committer | Damien Lallement <dams@mageia.org> | 2011-02-11 15:11:00 +0000 |
commit | c77f18e2c180a07d24e56b67c3787bf34e4cef4b (patch) | |
tree | fdaea66268a16ae06940b25a1ed23d878be329c5 | |
parent | bf38465ef38513ef7b7c8f22b75be98ba3999b22 (diff) | |
download | puppet-c77f18e2c180a07d24e56b67c3787bf34e4cef4b.tar puppet-c77f18e2c180a07d24e56b67c3787bf34e4cef4b.tar.gz puppet-c77f18e2c180a07d24e56b67c3787bf34e4cef4b.tar.bz2 puppet-c77f18e2c180a07d24e56b67c3787bf34e4cef4b.tar.xz puppet-c77f18e2c180a07d24e56b67c3787bf34e4cef4b.zip |
add the user creation by puppet
-rw-r--r-- | modules/blog/manifests/init.pp | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/modules/blog/manifests/init.pp b/modules/blog/manifests/init.pp index 31e034b8..6bdaa33f 100644 --- a/modules/blog/manifests/init.pp +++ b/modules/blog/manifests/init.pp @@ -1,14 +1,28 @@ -#TODO: -# - add the creation of the user 'blog' in puppet -# - add the user 'blog' to the 'apache' group (usermod -a -G apache blog) 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, @@ -18,20 +32,9 @@ class blog { content => template("blog/check_new-blog-post.sh") } - apache::vhost_other_app { "blog-test.$domain": - vhost_file => "blog/01_blogs_vhosts.conf", - } - - file { "/var/lib/blog": - ensure => directory, - owner => blog, - group => blog, - mode => 644, - } - file { "/var/www/html/blog.mageia.org": ensure => directory, - owner => apache, + owner => blog, group => blog, mode => 644, } |