From 076909377eaa3aa41936e3acb7e02a9b5b14d493 Mon Sep 17 00:00:00 2001 From: mh Date: Thu, 31 May 2012 11:38:45 +0200 Subject: fix various puppet language things --- manifests/vhost/davdbdir.pp | 2 +- manifests/vhost/file.pp | 40 ++++++++++++++++---------------- manifests/vhost/file/documentrootfile.pp | 22 +++++++++--------- manifests/vhost/gitweb.pp | 2 +- manifests/vhost/modperl.pp | 4 ++-- manifests/vhost/passenger.pp | 8 +++---- manifests/vhost/php/drupal.pp | 6 ++--- manifests/vhost/php/gallery2.pp | 32 ++++++++++++------------- manifests/vhost/php/joomla.pp | 39 +++++++++++++++---------------- manifests/vhost/php/silverstripe.pp | 8 +++---- manifests/vhost/php/simplemachine.pp | 20 ++++++++-------- manifests/vhost/php/spip.pp | 9 +++++-- manifests/vhost/php/standard.pp | 21 +++++++---------- manifests/vhost/php/typo3.pp | 40 ++++++++++++++++---------------- manifests/vhost/php/wordpress.pp | 6 ++--- manifests/vhost/redirect.pp | 2 +- manifests/vhost/template.pp | 20 ++++++++-------- manifests/vhost/webdav.pp | 2 +- manifests/vhost/webdir.pp | 20 ++++++++-------- 19 files changed, 151 insertions(+), 152 deletions(-) (limited to 'manifests/vhost') diff --git a/manifests/vhost/davdbdir.pp b/manifests/vhost/davdbdir.pp index a9528f7..459167c 100644 --- a/manifests/vhost/davdbdir.pp +++ b/manifests/vhost/davdbdir.pp @@ -11,7 +11,7 @@ define apache::vhost::davdbdir( case $dav_db_dir { 'absent': { include apache::defaultdavdbdir - $real_dav_db_dir = "/var/www/dav_db_dir/$name" + $real_dav_db_dir = "/var/www/dav_db_dir/${name}" } default: { $real_dav_db_dir = $dav_db_dir } } diff --git a/manifests/vhost/file.pp b/manifests/vhost/file.pp index fdea1f9..b42c4ce 100644 --- a/manifests/vhost/file.pp +++ b/manifests/vhost/file.pp @@ -51,16 +51,16 @@ define apache::vhost::file( $htpasswd_path = 'absent', $use_mod_macro = false ){ - $vhosts_dir = $operatingsystem ? { - centos => "$apache::centos::config_dir/vhosts.d", - gentoo => "$apache::gentoo::config_dir/vhosts.d", - debian => "$apache::debian::config_dir/sites-enabled", - ubuntu => "$apache::ubuntu::config_dir/sites-enabled", - openbsd => "$apache::openbsd::config_dir/vhosts.d", + $vhosts_dir = $::operatingsystem ? { + centos => "${apache::centos::config_dir}/vhosts.d", + gentoo => "${apache::gentoo::config_dir}/vhosts.d", + debian => "${apache::debian::config_dir}/sites-enabled", + ubuntu => "${apache::ubuntu::config_dir}/sites-enabled", + openbsd => "${apache::openbsd::config_dir}/vhosts.d", default => '/etc/apache2/vhosts.d', } $real_vhost_destination = $vhost_destination ? { - 'absent' => "$vhosts_dir/$name.conf", + 'absent' => "${vhosts_dir}/${name}.conf", default => $vhost_destination, } file{"${name}.conf": @@ -98,16 +98,16 @@ define apache::vhost::file( 'absent': { $real_vhost_source = $vhost_source ? { 'absent' => [ - "puppet:///modules/site_apache/vhosts.d/$fqdn/$name.conf", - "puppet:///modules/site_apache/vhosts.d/$apache_cluster_node/$name.conf", - "puppet:///modules/site_apache/vhosts.d/$operatingsystem.$lsbdistcodename/$name.conf", - "puppet:///modules/site_apache/vhosts.d/$operatingsystem/$name.conf", - "puppet:///modules/site_apache/vhosts.d/$name.conf", - "puppet:///modules/apache/vhosts.d/$operatingsystem.$lsbdistcodename/$name.conf", - "puppet:///modules/apache/vhosts.d/$operatingsystem/$name.conf", - "puppet:///modules/apache/vhosts.d/$name.conf" + "puppet:///modules/site_apache/vhosts.d/${::fqdn}/${name}.conf", + "puppet:///modules/site_apache/vhosts.d/{$apache::cluster_node}/${name}.conf", + "puppet:///modules/site_apache/vhosts.d/${::operatingsystem}.${::lsbdistcodename}/${name}.conf", + "puppet:///modules/site_apache/vhosts.d/${::operatingsystem}/${name}.conf", + "puppet:///modules/site_apache/vhosts.d/${name}.conf", + "puppet:///modules/apache/vhosts.d/${::operatingsystem}.${::lsbdistcodename}/${name}.conf", + "puppet:///modules/apache/vhosts.d/${::operatingsystem}/${name}.conf", + "puppet:///modules/apache/vhosts.d/${name}.conf" ], - default => "puppet:///$vhost_source", + default => "puppet:///${vhost_source}", } File["${name}.conf"]{ source => $real_vhost_source, @@ -124,7 +124,7 @@ define apache::vhost::file( 'absent','nodeploy': { info("don't deploy a htpasswd file for ${name}") } default: { if $htpasswd_path == 'absent' { - $real_htpasswd_path = "/var/www/htpasswds/$name" + $real_htpasswd_path = "/var/www/htpasswds/${name}" } else { $real_htpasswd_path = $htpasswd_path } @@ -133,9 +133,9 @@ define apache::vhost::file( } if ($ensure!='absent') { File[$real_htpasswd_path]{ - source => [ "puppet:///modules/site_apache/htpasswds/$fqdn/$name", - "puppet:///modules/site_apache/htpasswds/$apache_cluster_node/$name", - "puppet:///modules/site_apache/htpasswds/$name" ], + source => [ "puppet:///modules/site_apache/htpasswds/${::fqdn}/${name}", + "puppet:///modules/site_apache/htpasswds/${apache::cluster_node}/${name}", + "puppet:///modules/site_apache/htpasswds/${name}" ], owner => root, group => 0, mode => 0644, } } diff --git a/manifests/vhost/file/documentrootfile.pp b/manifests/vhost/file/documentrootfile.pp index 8645323..610d71c 100644 --- a/manifests/vhost/file/documentrootfile.pp +++ b/manifests/vhost/file/documentrootfile.pp @@ -6,19 +6,19 @@ define apache::vhost::file::documentrootfile( $group='0', $mode=440 ){ - file{"$documentroot/$filename": - source => [ "puppet:///modules/site_apache/vhost_varieties/$fqdn/$thedomain/$filename", - "puppet:///modules/site_apache/vhost_varieties/$apache_cluster_node/$thedomain/$filename", - "puppet:///modules/site_apache/vhost_varieties/$operatingsystem.$lsbdistcodename/$thedomain/$filename", - "puppet:///modules/site_apache/vhost_varieties/$operatingsystem/$thedomain/$filename", - "puppet:///modules/site_apache/vhost_varieties/$thedomain/$filename", - "puppet:///modules/apache/vhost_varieties/$thedomain/$filename", - "puppet:///modules/apache/vhost_varieties/$operatingsystem.$lsbdistcodename/$thedomain/$filename", - "puppet:///modules/apache/vhost_varieties/$operatingsystem/$thedomain/$filename", - "puppet:///modules/apache/vhost_varieties/$thedomain/$filename" + file{"${documentroot}/${filename}": + source => [ "puppet:///modules/site_apache/vhost_varieties/${::fqdn}/${thedomain}/${filename}", + "puppet:///modules/site_apache/vhost_varieties/${apache::cluster_node}/${thedomain}/${filename}", + "puppet:///modules/site_apache/vhost_varieties/${::operatingsystem}.${::lsbdistcodename}/${thedomain}/${filename}", + "puppet:///modules/site_apache/vhost_varieties/${::operatingsystem}/${thedomain}/${filename}", + "puppet:///modules/site_apache/vhost_varieties/${thedomain}/${filename}", + "puppet:///modules/apache/vhost_varieties/${thedomain}/${filename}", + "puppet:///modules/apache/vhost_varieties/${::operatingsystem}.${::lsbdistcodename}/${thedomain}/${filename}", + "puppet:///modules/apache/vhost_varieties/${::operatingsystem}/${thedomain}/${filename}", + "puppet:///modules/apache/vhost_varieties/${thedomain}/${filename}" ], ensure => file, - require => Apache::Vhost::Webdir["$thedomain"], + require => Apache::Vhost::Webdir[$thedomain], owner => $owner, group => $group, mode => $mode; } } diff --git a/manifests/vhost/gitweb.pp b/manifests/vhost/gitweb.pp index 5523af1..dab4983 100644 --- a/manifests/vhost/gitweb.pp +++ b/manifests/vhost/gitweb.pp @@ -30,7 +30,7 @@ define apache::vhost::gitweb( ensure => $ensure, path => '/var/www/git', path_is_webdir => true, - logpath => $operatingsystem ? { + logpath => $::operatingsystem ? { centos => '/var/log/httpd', fedora => '/var/log/httpd', redhat => '/var/log/httpd', diff --git a/manifests/vhost/modperl.pp b/manifests/vhost/modperl.pp index c7b9e59..35842dc 100644 --- a/manifests/vhost/modperl.pp +++ b/manifests/vhost/modperl.pp @@ -62,11 +62,11 @@ define apache::vhost::modperl( case $cgi_binpath { 'absent': { $real_path = $path ? { - 'absent' => $operatingsystem ? { + 'absent' => $::operatingsystem ? { openbsd => "/var/www/htdocs/${name}", default => "/var/www/vhosts/${name}" }, - default => "${path}" + default => $path } $real_cgi_binpath = "${real_path}/cgi-bin" } diff --git a/manifests/vhost/passenger.pp b/manifests/vhost/passenger.pp index 5dc58a8..0507add 100644 --- a/manifests/vhost/passenger.pp +++ b/manifests/vhost/passenger.pp @@ -70,11 +70,11 @@ define apache::vhost::passenger( } } $real_path = $path ? { - 'absent' => $operatingsystem ? { + 'absent' => $::operatingsystem ? { openbsd => "/var/www/htdocs/${name}", default => "/var/www/vhosts/${name}" }, - default => "${path}" + default => $path } $gempath = "${real_path}/gems" file{ @@ -83,13 +83,13 @@ define apache::vhost::passenger( owner => $documentroot_owner, group => $run_gid, mode => 0660; ["${real_path}/www/public", "${real_path}/gems"]: ensure => directory, - owner => $documentroot_owner, group => $run_gid, mode => 0640; + owner => $documentroot_owner, group => $run_gid, mode => 0640; } if $passenger_app == 'rails' { file{ "${real_path}/www/config": ensure => directory, - owner => $documentroot_owner, group => $run_gid, mode => 0640; + owner => $documentroot_owner, group => $run_gid, mode => 0640; "${real_path}/www/config/environment.rb": ensure => present, owner => $run_uid, group => $run_gid, mode => 0640; diff --git a/manifests/vhost/php/drupal.pp b/manifests/vhost/php/drupal.pp index d07beb7..4025ada 100644 --- a/manifests/vhost/php/drupal.pp +++ b/manifests/vhost/php/drupal.pp @@ -70,7 +70,7 @@ define apache::vhost::php::drupal( $manage_cron = true ){ $documentroot = $path ? { - 'absent' => $operatingsystem ? { + 'absent' => $::operatingsystem ? { openbsd => "/var/www/htdocs/${name}/www", default => "/var/www/vhosts/${name}/www" }, @@ -89,7 +89,7 @@ define apache::vhost::php::drupal( owner => root, group => 0, mode => 0644; } } - + $std_drupal_php_settings = { magic_quotes_gpc => 0, register_globals => 0, @@ -98,7 +98,7 @@ define apache::vhost::php::drupal( 'mbstring.http_output' => 'pass', 'mbstring.encoding_translation' => 0, } - + # create vhost configuration file ::apache::vhost::php::webapp{$name: ensure => $ensure, diff --git a/manifests/vhost/php/gallery2.pp b/manifests/vhost/php/gallery2.pp index 1eae2b3..d1876ff 100644 --- a/manifests/vhost/php/gallery2.pp +++ b/manifests/vhost/php/gallery2.pp @@ -69,38 +69,36 @@ define apache::vhost::php::gallery2( $upload_dir = 'present' ){ $documentroot = $path ? { - 'absent' => $operatingsystem ? { + 'absent' => $::operatingsystem ? { openbsd => "/var/www/htdocs/${name}/www", default => "/var/www/vhosts/${name}/www" }, default => "${path}/www" } $gdatadir = $path ? { - 'absent' => $operatingsystem ? { + 'absent' => $::operatingsystem ? { openbsd => "/var/www/htdocs/${name}/g2data", default => "/var/www/vhosts/${name}/g2data" }, default => "${path}/g2data" } - file{$gdatadir: - ensure => $ensure ? { - 'present' => directory, - default => absent - }, - owner => $documentroot_owner, group => $documentroot_group, mode => 0660; - } - if ($upload_dir == 'present') or ($upload_dir == 'absent') { - $real_upload_dir = $operatingsystem ? { + $real_upload_dir = $::operatingsystem ? { openbsd => "/var/www/htdocs/${name}/upload", default => "/var/www/vhosts/${name}/upload" } } else { $real_upload_dir = $upload_dir } - - file{$real_upload_dir: - owner => $documentroot_owner, group => $documentroot_group, mode => 0660; + file{ + $gdatadir: + ensure => $ensure ? { + 'present' => directory, + default => absent + }, + owner => $documentroot_owner, group => $documentroot_group, mode => 0660; + $real_upload_dir: + owner => $documentroot_owner, group => $documentroot_group, mode => 0660; } if ($ensure == 'absent') or ($upload_dir == 'absent') { File[$real_upload_dir]{ @@ -119,7 +117,7 @@ define apache::vhost::php::gallery2( safe_mode => 'Off', output_buffering => 'Off', } - + # php upload_tmp_dir case $php_settings[upload_tmp_dir] { '',undef: { @@ -137,8 +135,8 @@ define apache::vhost::php::gallery2( $gallery_php_settings[open_basedir] = "${documentroot}:${php_settings[upload_tmp_dir]}:${php_settings['session.save_path']}:${gdatadir}:${real_upload_dir}" } else { $gallery_php_settings[open_basedir] = "${documentroot}:${php_settings[upload_tmp_dir]}:${php_settings['session.save_path']}:${gdatadir}" - } - + } + $real_php_settings = merge($gallery_php_settings,$php_settings) # create vhost configuration file diff --git a/manifests/vhost/php/joomla.pp b/manifests/vhost/php/joomla.pp index 69b08f6..eed142c 100644 --- a/manifests/vhost/php/joomla.pp +++ b/manifests/vhost/php/joomla.pp @@ -64,13 +64,13 @@ define apache::vhost::php::joomla( include ::apache::include::joomla $documentroot = $path ? { - 'absent' => $operatingsystem ? { + 'absent' => $::operatingsystem ? { openbsd => "/var/www/htdocs/${name}/www", default => "/var/www/vhosts/${name}/www" }, default => "${path}/www" } - + if $mod_security_additional_options == 'absent' { $real_mod_security_additional_options = '# http://optics.csufresno.edu/~kriehn/fedora/fedora_files/f9/howto/modsecurity.html # Exceptions for Joomla Root Directory @@ -79,8 +79,7 @@ define apache::vhost::php::joomla( # Exceptions for Joomla Administration Panel - SecRule REQUEST_FILENAME "/administrator/index2.php" \ - "allow,phase:1,nolog,ctl:ruleEngine=Off" + SecRule REQUEST_FILENAME "/administrator/index2.php" "allow,phase:1,nolog,ctl:ruleEngine=Off" # Exceptions for Joomla Component Expose @@ -124,22 +123,22 @@ define apache::vhost::php::joomla( htpasswd_file => $htpasswd_file, htpasswd_path => $htpasswd_path, manage_directories => $manage_directories, - managed_directories => [ "$documentroot/administrator/backups", - "$documentroot/administrator/components", - "$documentroot/administrator/language", - "$documentroot/administrator/modules", - "$documentroot/administrator/templates", - "$documentroot/components", - "$documentroot/dmdocuments", - "$documentroot/images", - "$documentroot/language", - "$documentroot/media", - "$documentroot/modules", - "$documentroot/plugins", - "$documentroot/templates", - "$documentroot/cache", - "$documentroot/tmp", - "$documentroot/administrator/cache" ], + managed_directories => [ "${documentroot}/administrator/backups", + "${documentroot}/administrator/components", + "${documentroot}/administrator/language", + "${documentroot}/administrator/modules", + "${documentroot}/administrator/templates", + "${documentroot}/components", + "${documentroot}/dmdocuments", + "${documentroot}/images", + "${documentroot}/language", + "${documentroot}/media", + "${documentroot}/modules", + "${documentroot}/plugins", + "${documentroot}/templates", + "${documentroot}/cache", + "${documentroot}/tmp", + "${documentroot}/administrator/cache" ], manage_config => $manage_config, config_webwriteable => $config_webwriteable, config_file => 'configuration.php', diff --git a/manifests/vhost/php/silverstripe.pp b/manifests/vhost/php/silverstripe.pp index d120f04..da58296 100644 --- a/manifests/vhost/php/silverstripe.pp +++ b/manifests/vhost/php/silverstripe.pp @@ -61,11 +61,11 @@ define apache::vhost::php::silverstripe( $config_webwriteable = false, $manage_directories = true ){ - + include ::apache::include::silverstripe - + $documentroot = $path ? { - 'absent' => $operatingsystem ? { + 'absent' => $::operatingsystem ? { openbsd => "/var/www/htdocs/${name}/www", default => "/var/www/vhosts/${name}/www" }, @@ -109,7 +109,7 @@ define apache::vhost::php::silverstripe( htpasswd_file => $htpasswd_file, htpasswd_path => $htpasswd_path, manage_directories => $manage_directories, - managed_directories => [ "$documentroot/assets" ], + managed_directories => [ "${documentroot}/assets" ], manage_config => $manage_config, } diff --git a/manifests/vhost/php/simplemachine.pp b/manifests/vhost/php/simplemachine.pp index 78a165e..b5178da 100644 --- a/manifests/vhost/php/simplemachine.pp +++ b/manifests/vhost/php/simplemachine.pp @@ -62,7 +62,7 @@ define apache::vhost::php::simplemachine( $manage_directories = true ){ $documentroot = $path ? { - 'absent' => $operatingsystem ? { + 'absent' => $::operatingsystem ? { openbsd => "/var/www/htdocs/${name}/www", default => "/var/www/vhosts/${name}/www" }, @@ -105,15 +105,15 @@ define apache::vhost::php::simplemachine( htpasswd_path => $htpasswd_path, manage_directories => $manage_directories, managed_directories => [ - "$documentroot/agreement.txt", - "$documentroot/attachments", - "$documentroot/avatars", - "$documentroot/cache", - "$documentroot/Packages", - "$documentroot/Packages/installed.list", - "$documentroot/Smileys", - "$documentroot/Themes", - "$documentroot/Themes/default/languages/Install.english.php" + "${documentroot}/agreement.txt", + "${documentroot}/attachments", + "${documentroot}/avatars", + "${documentroot}/cache", + "${documentroot}/Packages", + "${documentroot}/Packages/installed.list", + "${documentroot}/Smileys", + "${documentroot}/Themes", + "${documentroot}/Themes/default/languages/Install.english.php" ], manage_config => $manage_config, config_webwriteable => $config_webwriteable, diff --git a/manifests/vhost/php/spip.pp b/manifests/vhost/php/spip.pp index 696ac8b..5f4ffdb 100644 --- a/manifests/vhost/php/spip.pp +++ b/manifests/vhost/php/spip.pp @@ -59,7 +59,7 @@ define apache::vhost::php::spip( $htpasswd_path = 'absent' ){ $documentroot = $path ? { - 'absent' => $operatingsystem ? { + 'absent' => $::operatingsystem ? { openbsd => "/var/www/htdocs/${name}/www", default => "/var/www/vhosts/${name}/www" }, @@ -100,7 +100,12 @@ define apache::vhost::php::spip( vhost_destination => $vhost_destination, htpasswd_file => $htpasswd_file, htpasswd_path => $htpasswd_path, - managed_directories => [ "$documentroot/IMG", "$documentroot/tmp", "$documentroot/local", "$documentroot/config" ], + managed_directories => [ + "${documentroot}/IMG", + "${documentroot}/tmp", + "${documentroot}/local", + "${documentroot}/config" + ], manage_config => false, } } diff --git a/manifests/vhost/php/standard.pp b/manifests/vhost/php/standard.pp index aea4551..3814680 100644 --- a/manifests/vhost/php/standard.pp +++ b/manifests/vhost/php/standard.pp @@ -78,9 +78,9 @@ define apache::vhost::php::standard( documentroot_mode => $documentroot_mode, } } - + $real_path = $path ? { - 'absent' => $operatingsystem ? { + 'absent' => $::operatingsystem ? { openbsd => "/var/www/htdocs/${name}", default => "/var/www/vhosts/${name}" }, @@ -96,13 +96,13 @@ define apache::vhost::php::standard( 'absent' => "$real_path/logs", default => $logpath } - + $std_php_options = { smarty => false, pear => false, } $real_php_options = merge($std_php_options,$php_options) - + if $real_php_options[smarty] { include php::extensions::smarty $smarty_path = '/usr/share/php/Smarty/:' @@ -115,7 +115,7 @@ define apache::vhost::php::standard( } else { $pear_path = '' } - + $std_php_settings = { engine => 'On', @@ -130,7 +130,7 @@ define apache::vhost::php::standard( if $run_mode == 'fcgid' { $std_php_settings[safe_mode_gid] = 'On' } - + if has_key($php_settings,'safe_mode_exec_dir') { $php_safe_mode_exec_dir = $php_settings[safe_mode_exec_dir] } else { @@ -166,7 +166,7 @@ define apache::vhost::php::standard( ensure => absent, } } - + if !has_key($php_settings,'default_charset') { if $default_charset != 'absent' { $std_php_settings[default_charset] = $default_charset ? { @@ -175,15 +175,12 @@ define apache::vhost::php::standard( } } } - + $real_php_settings = merge($std_php_settings,$php_settings) - + $passing_extension = 'php' if $ensure != 'absent' { case $run_mode { - 'itk': { - include ::php::itk - } 'proxy-itk','static-itk': { include ::php::itk_plus } diff --git a/manifests/vhost/php/typo3.pp b/manifests/vhost/php/typo3.pp index 6ed0fa5..a9f12d8 100644 --- a/manifests/vhost/php/typo3.pp +++ b/manifests/vhost/php/typo3.pp @@ -62,13 +62,13 @@ define apache::vhost::php::typo3( $manage_directories = true ){ $documentroot = $path ? { - 'absent' => $operatingsystem ? { + 'absent' => $::operatingsystem ? { openbsd => "/var/www/htdocs/${name}/www", default => "/var/www/vhosts/${name}/www" }, default => "${path}/www" } - + $modsec_rules = ["960010"] $real_mod_security_rules_to_disable = array_union($mod_security_rules_to_disable,$modsec_rules) if $mod_security_additional_options == 'absent' { @@ -80,7 +80,7 @@ define apache::vhost::php::typo3( } else { $real_mod_security_additional_options = $mod_security_additional_options } - + $typo3_php_settings = { # turn allow_url_fopen on for the extension manager fetch allow_url_fopen => 'On' @@ -122,23 +122,23 @@ define apache::vhost::php::typo3( htpasswd_file => $htpasswd_file, htpasswd_path => $htpasswd_path, manage_directories => $manage_directories, - managed_directories => [ "$documentroot/typo3temp", - "$documentroot/typo3temp/pics", - "$documentroot/typo3temp/temp", - "$documentroot/typo3temp/llxml", - "$documentroot/typo3temp/cs", - "$documentroot/typo3temp/GB", - "$documentroot/typo3temp/locks", - "$documentroot/typo3conf", - "$documentroot/typo3conf/ext", - "$documentroot/typo3conf/l10n", - # "$documentroot/typo3/ext/", # only needed for ext manager installing global extensions - "$documentroot/uploads", - "$documentroot/uploads/pics", - "$documentroot/uploads/media", - "$documentroot/uploads/tf", - "$documentroot/fileadmin", - "$documentroot/fileadmin/_temp_" + managed_directories => [ "${documentroot}/typo3temp", + "${documentroot}/typo3temp/pics", + "${documentroot}/typo3temp/temp", + "${documentroot}/typo3temp/llxml", + "${documentroot}/typo3temp/cs", + "${documentroot}/typo3temp/GB", + "${documentroot}/typo3temp/locks", + "${documentroot}/typo3conf", + "${documentroot}/typo3conf/ext", + "${documentroot}/typo3conf/l10n", + # "${documentroot}/typo3/ext/", # only needed for ext manager installing global extensions + "${documentroot}/uploads", + "${documentroot}/uploads/pics", + "${documentroot}/uploads/media", + "${documentroot}/uploads/tf", + "${documentroot}/fileadmin", + "${documentroot}/fileadmin/_temp_" ], manage_config => $manage_config, } diff --git a/manifests/vhost/php/wordpress.pp b/manifests/vhost/php/wordpress.pp index fef0807..b3f98c1 100644 --- a/manifests/vhost/php/wordpress.pp +++ b/manifests/vhost/php/wordpress.pp @@ -63,7 +63,7 @@ define apache::vhost::php::wordpress( ){ $documentroot = $path ? { - 'absent' => $operatingsystem ? { + 'absent' => $::operatingsystem ? { openbsd => "/var/www/htdocs/${name}/www", default => "/var/www/vhosts/${name}/www" }, @@ -98,7 +98,7 @@ define apache::vhost::php::wordpress( mod_security => $mod_security, mod_security_relevantonly => $mod_security_relevantonly, mod_security_rules_to_disable => $real_mod_security_rules_to_disable, - mod_security_additional_options => $mod_security_additional_options, + mod_security_additional_options => $mod_security_additional_options, ssl_mode => $ssl_mode, vhost_mode => $vhost_mode, template_partial => $template_partial, @@ -107,7 +107,7 @@ define apache::vhost::php::wordpress( htpasswd_file => $htpasswd_file, htpasswd_path => $htpasswd_path, manage_directories => $manage_directories, - managed_directories => "$documentroot/wp-content", + managed_directories => "${documentroot}/wp-content", manage_config => $manage_config, config_webwriteable => $config_webwriteable, config_file => 'wp-config.php', diff --git a/manifests/vhost/redirect.pp b/manifests/vhost/redirect.pp index ec23fb7..a106c59 100644 --- a/manifests/vhost/redirect.pp +++ b/manifests/vhost/redirect.pp @@ -38,7 +38,7 @@ define apache::vhost::redirect( path_is_webdir => true, domainalias => $domainalias, server_admin => $server_admin, - logpath => $operatingsystem ? { + logpath => $::operatingsystem ? { openbsd => '/var/www/logs', centos => '/var/log/httpd', default => '/var/log/apache2' diff --git a/manifests/vhost/template.pp b/manifests/vhost/template.pp index 11926a6..c19faba 100644 --- a/manifests/vhost/template.pp +++ b/manifests/vhost/template.pp @@ -74,20 +74,20 @@ define apache::vhost::template( $ldap_user = 'any' ){ $real_path = $path ? { - 'absent' => $operatingsystem ? { - openbsd => "/var/www/htdocs/$name", - default => "/var/www/vhosts/$name" + 'absent' => $::operatingsystem ? { + openbsd => "/var/www/htdocs/${name}", + default => "/var/www/vhosts/${name}" }, default => $path } if $path_is_webdir { - $documentroot = "$real_path" + $documentroot = $real_path } else { - $documentroot = "$real_path/www" + $documentroot = "${real_path}/www" } $logdir = $logpath ? { - 'absent' => "$real_path/logs", + 'absent' => "${real_path}/logs", default => $logpath } @@ -101,7 +101,7 @@ define apache::vhost::template( default => $domainalias } if $htpasswd_path == 'absent' { - $real_htpasswd_path = "/var/www/htpasswds/$name" + $real_htpasswd_path = "/var/www/htpasswds/${name}" } else { $real_htpasswd_path = $htpasswd_path } @@ -112,10 +112,10 @@ define apache::vhost::template( case $run_mode { 'fcgid','itk','proxy-itk','static-itk': { case $run_uid { - 'absent': { fail("you have to define run_uid for $name on $fqdn") } + 'absent': { fail("you have to define run_uid for ${name} on ${::fqdn}") } } case $run_gid { - 'absent': { fail("you have to define run_gid for $name on $fqdn") } + 'absent': { fail("you have to define run_gid for ${name} on ${::fqdn}") } } } } @@ -123,7 +123,7 @@ define apache::vhost::template( # dav db dir case $dav_db_dir { 'absent': { - $real_dav_db_dir = "/var/www/dav_db_dir/$name" + $real_dav_db_dir = "/var/www/dav_db_dir/${name}" } default: { $real_dav_db_dir = $dav_db_dir } } diff --git a/manifests/vhost/webdav.pp b/manifests/vhost/webdav.pp index e175324..003a308 100644 --- a/manifests/vhost/webdav.pp +++ b/manifests/vhost/webdav.pp @@ -58,7 +58,7 @@ define apache::vhost::webdav( $ldap_user = 'any', $dav_db_dir = 'absent' ){ - ::apache::vhost::davdbdir{"${name}": + ::apache::vhost::davdbdir{$name: ensure => $ensure, dav_db_dir => $dav_db_dir, documentroot_owner => $documentroot_owner, diff --git a/manifests/vhost/webdir.pp b/manifests/vhost/webdir.pp index ca3b2b6..e9eda1b 100644 --- a/manifests/vhost/webdir.pp +++ b/manifests/vhost/webdir.pp @@ -13,7 +13,7 @@ define apache::vhost::webdir( $documentroot_recurse = false ){ $real_path = $path ? { - 'absent' => $operatingsystem ? { + 'absent' => $::operatingsystem ? { openbsd => "/var/www/htdocs/${name}", default => "/var/www/vhosts/${name}" }, @@ -31,7 +31,7 @@ define apache::vhost::webdir( if $owner == 'apache' { if $apache_default_user == '' { - $real_owner = $operatingsystem ? { + $real_owner = $::operatingsystem ? { openbsd => 'www', debian => 'www-data', default => $owner @@ -44,7 +44,7 @@ define apache::vhost::webdir( } if $group == 'apache' { if $apache_default_group == '' { - $real_group = $operatingsystem ? { + $real_group = $::operatingsystem ? { openbsd => 'www', debian => 'www-data', default => $group @@ -58,7 +58,7 @@ define apache::vhost::webdir( if $documentroot_owner == 'apache' { if $apache_default_user == '' { - $real_documentroot_owner = $operatingsystem ? { + $real_documentroot_owner = $::operatingsystem ? { openbsd => 'www', debian => 'www-data', default => $documentroot_owner @@ -71,7 +71,7 @@ define apache::vhost::webdir( } if $documentroot_group == 'apache' { if $apache_default_group == '' { - $real_documentroot_group = $operatingsystem ? { + $real_documentroot_group = $::operatingsystem ? { openbsd => 'www', debian => 'www-data', default => $documentroot_group @@ -85,9 +85,9 @@ define apache::vhost::webdir( case $ensure { absent: { if $manage_docroot { - $managed_directories = [ "$real_path", "${real_path}/private", "$logdir", "$documentroot" ] + $managed_directories = [ $real_path, "${real_path}/private", $logdir, $documentroot ] } else { - $managed_directories = [ "$real_path", "${real_path}/private", "$logdir" ] + $managed_directories = [ $real_path, "${real_path}/private", $logdir ] } file{$managed_directories: ensure => absent, @@ -97,12 +97,12 @@ define apache::vhost::webdir( } } default: { - file{"$real_path": + file{$real_path: ensure => directory, owner => $real_owner, group => $real_group, mode => $real_mode; } if $manage_docroot { - file{"$documentroot": + file{$documentroot: ensure => directory, recurse => $documentroot_recurse, owner => $real_documentroot_owner, group => $real_documentroot_group, mode => $documentroot_mode; @@ -112,7 +112,7 @@ define apache::vhost::webdir( ensure => directory, owner => $real_documentroot_owner, group => $real_documentroot_group, mode => 0660; } - case $operatingsystem { + case $::operatingsystem { centos: { include apache::logrotate::centos::vhosts } } file{"${real_path}/private": -- cgit v1.2.3