From fbb3cb7dcd8406f085e80f3f11fa873b55bd5073 Mon Sep 17 00:00:00 2001 From: mh Date: Sun, 17 May 2009 22:27:05 +0200 Subject: extracted every define and class in it's own file --- manifests/centos/module.pp | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 manifests/centos/module.pp (limited to 'manifests/centos/module.pp') diff --git a/manifests/centos/module.pp b/manifests/centos/module.pp new file mode 100644 index 0000000..ebd6edc --- /dev/null +++ b/manifests/centos/module.pp @@ -0,0 +1,30 @@ +define apache::centos::module( + $ensure = present, + $source = '', + $destination = '' +){ + $modules_dir = "$apache::centos::config_dir/modules.d/" + $real_destination = $destination ? { + '' => "${modules_dir}/${name}.so", + default => $destination, + } + $real_source = $source ? { + '' => [ + "puppet://$server/files/apache/modules.d/${fqdn}/${name}.so", + "puppet://$server/files/apache/modules.d/${apache_cluster_node}/${name}.so", + "puppet://$server/files/apache/modules.d/${name}.so", + "puppet://$server/apache/modules.d/${operatingsystem}/${name}.so", + "puppet://$server/apache/modules.d/${name}.so" + ], + 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 => 0755; + } +} + -- cgit v1.2.3