From a47b1ea92dffb48647125f25ba6f0d3a95a1afc4 Mon Sep 17 00:00:00 2001 From: mh Date: Sat, 23 May 2009 01:13:35 +0200 Subject: fixing location --- manifests/gentoo/module.pp | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 manifests/gentoo/module.pp (limited to 'manifests/gentoo') diff --git a/manifests/gentoo/module.pp b/manifests/gentoo/module.pp new file mode 100644 index 0000000..262a25c --- /dev/null +++ b/manifests/gentoo/module.pp @@ -0,0 +1,30 @@ +define apache::gentoo::module( + $ensure = present, + $source = '', + $destination = '' +){ + $modules_dir = "$apache::gentoo::config_dir/modules.d/" + $real_destination = $destination ? { + '' => "${modules_dir}/${name}.conf", + default => $destination, + } + $real_source = $source ? { + '' => [ + "puppet://$server/files/apache/modules.d/${fqdn}/${name}.conf", + "puppet://$server/files/apache/modules.d/${apache_cluster_node}/${name}.conf", + "puppet://$server/files/apache/modules.d/${name}.conf", + "puppet://$server/apache/modules.d/${operatingsystem}/${name}.conf", + "puppet://$server/apache/modules.d/${name}.conf" + ], + default => "puppet://$server/$source", + } + file{"modules_${name}.conf": + ensure => $ensure, + path => $real_destination, + source => $real_source, + require => [ File[modules_dir], Package[apache] ], + notify => Service[apache], + owner => root, group => 0, mode => 0644; + } +} + -- cgit v1.2.3