From 3f7b286a3b5e190b6ba7f57e52ebca51996e6890 Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Thu, 15 Mar 2012 15:56:38 +0000 Subject: split phpbb::config in a separate file to please puppet-lint --- modules/phpbb/manifests/config.pp | 12 ++++++++++++ modules/phpbb/manifests/init.pp | 15 +-------------- 2 files changed, 13 insertions(+), 14 deletions(-) create mode 100644 modules/phpbb/manifests/config.pp (limited to 'modules/phpbb') diff --git a/modules/phpbb/manifests/config.pp b/modules/phpbb/manifests/config.pp new file mode 100644 index 00000000..52bd5419 --- /dev/null +++ b/modules/phpbb/manifests/config.pp @@ -0,0 +1,12 @@ +define phpbb::config($key, $value, $database) { + exec { "phpbb_apply $name": + command => "/usr/local/bin/phpbb_apply_config.pl $key", + user => 'root', + environment => ["PGDATABASE=$database", + "PGUSER=$phpbb::base::user", + "PGPASSWORD=$phpbb::base::pgsql_password", + "PGHOST=pgsql.$::domain", + "VALUE=$value"], + require => File['/usr/local/bin/phpbb_apply_config.pl'], + } +} diff --git a/modules/phpbb/manifests/init.pp b/modules/phpbb/manifests/init.pp index fd85d904..90248384 100644 --- a/modules/phpbb/manifests/init.pp +++ b/modules/phpbb/manifests/init.pp @@ -1,18 +1,5 @@ class phpbb { - define config($key, $value, $database) { - exec { "phpbb_apply $name": - command => "/usr/local/bin/phpbb_apply_config.pl $key", - user => root, - environment => ["PGDATABASE=$database", - "PGUSER=$phpbb::base::user", - "PGPASSWORD=$phpbb::base::pgsql_password", - "PGHOST=pgsql.$domain", - "VALUE=$value"], - require => File["/usr/local/bin/phpbb_apply_config.pl"], - } - } - - define redirection_instance($url) { + define redirection_instance($url) { $lang = $name file { "/etc/httpd/conf/vhosts.d/forums.d/redirect_$name.conf": content => template("phpbb/forums_redirect.conf"), -- cgit v1.2.1