From e52e80b0a1857f7ffdb1566e8d402e26beec289a Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Mon, 18 Apr 2011 10:14:34 +0000 Subject: fix reentrency issues of phpbb module ( ie, apache_writable_dir that could not be declared more than once ) --- modules/phpbb/manifests/init.pp | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'modules/phpbb/manifests') diff --git a/modules/phpbb/manifests/init.pp b/modules/phpbb/manifests/init.pp index 7cc2f9f7..7f6e166e 100644 --- a/modules/phpbb/manifests/init.pp +++ b/modules/phpbb/manifests/init.pp @@ -64,16 +64,6 @@ class phpbb { } } - define apache_writable_dir() { - file { "$forums_dir/$lang/phpBB/$name": - ensure => directory, - owner => apache, - group => root, - mode => 755, - require => Exec["git_clone $lang"], - } - } - # TODO find a way to avoid all the phpbb::base prefix define instance() { include phpbb::base @@ -104,10 +94,20 @@ class phpbb { # list found by reading ./install/install_install.php # end of check_server_requirements ( 2 loops ) - apache_writable_dir { ['cache', - 'images/avatars/upload', - 'files', - 'store' ]: + + $writable_dirs = ['cache', + 'images/avatars/upload', + 'files', + 'store' ] + + $dir_names = regsubst($writable_dirs,'^',"$forums_dir/$lang/phpBB/") + + file { $dir_names: + ensure => directory, + owner => apache, + group => root, + mode => 755, + require => Exec["git_clone $lang"], } file { "$forums_dir/$lang/phpBB/config.php": -- cgit v1.2.1