diff options
author | Jerome Charaoui <jcharaoui@cmaisonneuve.qc.ca> | 2009-12-23 16:06:45 -0500 |
---|---|---|
committer | Jerome Charaoui <jcharaoui@cmaisonneuve.qc.ca> | 2009-12-23 16:06:45 -0500 |
commit | d2c4bdf792815f0a0f54d717bdec619f03d984ab (patch) | |
tree | b80bd6aa94eda96089ebb005763f9f39eb71d76c /manifests/config/file.pp | |
parent | 9513cf4a201d0e7148aa5f0db490a29a02611b19 (diff) |
introduce config::global for global configs in conf.d and config::include for vhost snippets in include.d
Diffstat (limited to 'manifests/config/file.pp')
-rw-r--r-- | manifests/config/file.pp | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/manifests/config/file.pp b/manifests/config/file.pp index a72aacf..9e49c19 100644 --- a/manifests/config/file.pp +++ b/manifests/config/file.pp @@ -1,4 +1,5 @@ -# deploy apache (.conf) configuration file (non-vhost) +# deploy apache configuration file +# by default we assume it's a global configuration file define apache::config::file( $ensure = present, $source = 'absent', @@ -7,11 +8,11 @@ define apache::config::file( ){ $real_destination = $destination ? { 'absent' => $operatingsystem ? { - centos => "$apache::centos::config_dir/conf.d/${name}", - gentoo => "$apache::gentoo::config_dir/${name}", - debian => "$apache::debian::config_dir/conf.d/${name}", - ubuntu => "$apache::ubuntu::config_dir/conf.d/${name}", - openbsd => "$apache::openbsd::config_dir/conf.d/${name}", + centos => "${apache::centos::config_dir}/conf.d/${name}", + gentoo => "${apache::gentoo::config_dir}/${name}", + debian => "${apache::debian::config_dir}/conf.d/${name}", + ubuntu => "${apache::ubuntu::config_dir}/conf.d/${name}", + openbsd => "${apache::openbsd::config_dir}/conf.d/${name}", default => "/etc/apache2/${name}", }, default => $destination @@ -26,16 +27,16 @@ define apache::config::file( 'absent': { $real_source = $source ? { 'absent' => [ - "puppet://$server/modules/site-apache/conf.d/${fqdn}/${name}", - "puppet://$server/modules/site-apache/conf.d/${apache_cluster_node}/${name}", - "puppet://$server/modules/site-apache/conf.d/${operatingsystem}.${lsbdistcodename}/${name}", - "puppet://$server/modules/site-apache/conf.d/${operatingsystem}/${name}", - "puppet://$server/modules/site-apache/conf.d/${name}", - "puppet://$server/modules/apache/conf.d/${operatingsystem}.${lsbdistcodename}/${name}", - "puppet://$server/modules/apache/conf.d/${operatingsystem}/${name}", - "puppet://$server/modules/apache/conf.d/${name}" + "puppet://${server}/modules/site-apache/conf.d/${fqdn}/${name}", + "puppet://${server}/modules/site-apache/conf.d/${apache_cluster_node}/${name}", + "puppet://${server}/modules/site-apache/conf.d/${operatingsystem}.${lsbdistcodename}/${name}", + "puppet://${server}/modules/site-apache/conf.d/${operatingsystem}/${name}", + "puppet://${server}/modules/site-apache/conf.d/${name}", + "puppet://${server}/modules/apache/conf.d/${operatingsystem}.${lsbdistcodename}/${name}", + "puppet://${server}/modules/apache/conf.d/${operatingsystem}/${name}", + "puppet://${server}/modules/apache/conf.d/${name}" ], - default => "puppet://$server/$source", + default => "puppet://${server}/${source}", } File["apache_${name}"]{ source => $real_source, |