summaryrefslogtreecommitdiff
path: root/manifests/vhost/file
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/vhost/file
parentc4b3c53375ab001c5cb6407537d64ff3b2ec35cf (diff)
extracted every define and class in it's own file
Diffstat (limited to 'manifests/vhost/file')
-rw-r--r--manifests/vhost/file/documentrootdir.pp24
-rw-r--r--manifests/vhost/file/documentrootfile.pp25
2 files changed, 49 insertions, 0 deletions
diff --git a/manifests/vhost/file/documentrootdir.pp b/manifests/vhost/file/documentrootdir.pp
new file mode 100644
index 0000000..425406a
--- /dev/null
+++ b/manifests/vhost/file/documentrootdir.pp
@@ -0,0 +1,24 @@
+define apache::vhost::file::documentrootdir(
+ $ensure = directory,
+ $documentroot,
+ $filename,
+ $thedomain,
+ $owner = 'root',
+ $group = '0',
+ $mode = 440
+){
+ file{"$documentroot/$filename":
+ require => Apache::Vhost::Webdir["$thedomain"],
+ owner => $owner, group => $group, mode => $mode;
+ }
+ if $ensure != 'absent' {
+ File["$documentroot/$filename"]{
+ ensure => directory,
+ }
+ } else {
+ File["$documentroot/$filename"]{
+ ensure => $ensure,
+ }
+ }
+}
+
diff --git a/manifests/vhost/file/documentrootfile.pp b/manifests/vhost/file/documentrootfile.pp
new file mode 100644
index 0000000..c9daf9c
--- /dev/null
+++ b/manifests/vhost/file/documentrootfile.pp
@@ -0,0 +1,25 @@
+define apache::vhost::file::documentrootfile(
+ $documentroot,
+ $filename,
+ $thedomain,
+ $owner='root',
+ $group='0',
+ $mode=440
+){
+ file{"$documentroot/$filename":
+ source => [ "puppet://$server/files/apache/vhost_varieties/$fqdn/$thedomain/$filename",
+ "puppet://$server/files/apache/vhost_varieties/$apache_cluster_node/$thedomain/$filename",
+ "puppet://$server/files/apache/vhost_varieties/$operatingsystem.$lsbdistcodename/$thedomain/$filename",
+ "puppet://$server/files/apache/vhost_varieties/$operatingsystem/$thedomain/$filename",
+ "puppet://$server/files/apache/vhost_varieties/$thedomain/$filename",
+ "puppet://$server/apache/vhost_varieties/$thedomain/$filename",
+ "puppet://$server/apache/vhost_varieties/$operatingsystem.$lsbdistcodename/$thedomain/$filename",
+ "puppet://$server/apache/vhost_varieties/$operatingsystem/$thedomain/$filename",
+ "puppet://$server/apache/vhost_varieties/$thedomain/$filename"
+ ],
+ ensure => file,
+ require => Apache::Vhost::Webdir["$thedomain"],
+ owner => $owner, group => $group, mode => $mode;
+ }
+}
+