summaryrefslogtreecommitdiff
path: root/manifests/centos
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2009-05-17 22:27:05 +0200
committermh <mh@immerda.ch>2009-05-17 22:27:05 +0200
commitfbb3cb7dcd8406f085e80f3f11fa873b55bd5073 (patch)
treea95d59498674420347e7c115569cc42407d85d82 /manifests/centos
parentc4b3c53375ab001c5cb6407537d64ff3b2ec35cf (diff)
extracted every define and class in it's own file
Diffstat (limited to 'manifests/centos')
-rw-r--r--manifests/centos/gentoo.pp30
-rw-r--r--manifests/centos/module.pp30
2 files changed, 60 insertions, 0 deletions
diff --git a/manifests/centos/gentoo.pp b/manifests/centos/gentoo.pp
new file mode 100644
index 0000000..262a25c
--- /dev/null
+++ b/manifests/centos/gentoo.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;
+ }
+}
+
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;
+ }
+}
+