diff options
author | Michael Scherer <misc@mageia.org> | 2011-02-12 14:03:27 +0000 |
---|---|---|
committer | Michael Scherer <misc@mageia.org> | 2011-02-12 14:03:27 +0000 |
commit | 24aa153210c0c1fedbff72a23ca420294f9d9cb7 (patch) | |
tree | d93ef0b5507ed173cbdbde996e67373107650f27 /modules/blog | |
parent | 16035a11f7bcf2c7613a17895069010baf072ab9 (diff) | |
download | puppet-24aa153210c0c1fedbff72a23ca420294f9d9cb7.tar puppet-24aa153210c0c1fedbff72a23ca420294f9d9cb7.tar.gz puppet-24aa153210c0c1fedbff72a23ca420294f9d9cb7.tar.bz2 puppet-24aa153210c0c1fedbff72a23ca420294f9d9cb7.tar.xz puppet-24aa153210c0c1fedbff72a23ca420294f9d9cb7.zip |
- use variable for the blog domain and location (less stuff to change
later )
Diffstat (limited to 'modules/blog')
-rw-r--r-- | modules/blog/manifests/init.pp | 7 | ||||
-rw-r--r-- | modules/blog/templates/blogs_vhosts.conf | 6 |
2 files changed, 8 insertions, 5 deletions
diff --git a/modules/blog/manifests/init.pp b/modules/blog/manifests/init.pp index f444fa21..1b602b3a 100644 --- a/modules/blog/manifests/init.pp +++ b/modules/blog/manifests/init.pp @@ -30,11 +30,14 @@ class blog { include apache::mod_php include mysql - apache::vhost_other_app { "blog-test.$domain": + + $blog_location = "/var/www/html/blog.$domain" + $blog_domain = "blog-test.$domain" + apache::vhost_other_app { "$blog_domain": vhost_file => "blog/blogs_vhosts.conf", } - file { "/var/www/html/blog.$domain": + file { "$blog_location": ensure => directory, owner => blog, # FIXME is the group created by puppet ? diff --git a/modules/blog/templates/blogs_vhosts.conf b/modules/blog/templates/blogs_vhosts.conf index dae15b40..86c2b7b7 100644 --- a/modules/blog/templates/blogs_vhosts.conf +++ b/modules/blog/templates/blogs_vhosts.conf @@ -1,7 +1,7 @@ <VirtualHost *:80> -ServerName blog-test.mageia.org -DocumentRoot /var/www/html/blog.mageia.org/ -<Directory /var/www/html/blog.mageia.org/> +ServerName <%= blog_domain %> +DocumentRoot <%= blog_location %> +<Directory <%= blog_location %> > Order deny,allow Allow from All AllowOverride All |