summaryrefslogtreecommitdiff
path: root/manifests/vhost/file.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/vhost/file.pp')
-rw-r--r--manifests/vhost/file.pp53
1 files changed, 25 insertions, 28 deletions
diff --git a/manifests/vhost/file.pp b/manifests/vhost/file.pp
index 054a530..c3f82c1 100644
--- a/manifests/vhost/file.pp
+++ b/manifests/vhost/file.pp
@@ -3,35 +3,32 @@ define lighttpd::vhost::file(
$vhost_source = 'absent',
$content = 'absent'
){
- include ::lighttpd::vhosts
- file{"/etc/lighttpd/vhosts.d/${name}.conf":
- ensure => $ensure,
- notify => Service['lighttpd'],
- owner => root, group => 0, mode => 0644;
- }
+ include ::lighttpd::vhosts
+ file{"/etc/lighttpd/vhosts.d/${name}.conf":
+ ensure => $ensure,
+ notify => Service['lighttpd'],
+ owner => root, group => 0, mode => 0644;
+ }
- case $content {
- 'absent': {
- File["/etc/lighttpd/vhosts.d/${name}.conf"]{
- source => $vhost_source ? {
- 'absent' => [
- "puppet:///modules/site-lighttpd/vhosts.d/$fqdn/$name.conf",
- "puppet:///modules/site-lighttpd/vhosts.d/$lighttpd_cluster_node/$name.conf",
- "puppet:///modules/site-lighttpd/vhosts.d/$operatingsystem.$lsbdistcodename/$name.conf",
- "puppet:///modules/site-lighttpd/vhosts.d/$operatingsystem/$name.conf",
- "puppet:///modules/site-lighttpd/vhosts.d/$name.conf",
- "puppet:///modules/lighttpd/vhosts.d/$operatingsystem.$lsbdistcodename/$name.conf",
- "puppet:///modules/lighttpd/vhosts.d/$operatingsystem/$name.conf",
- "puppet:///modules/lighttpd/vhosts.d/$name.conf"
- ],
- default => "puppet:///$vhost_source",
- }
- }
- }
- default: {
- File["/etc/lighttpd/vhosts.d/${name}.conf"]{
- content => $content,
- }
+ case $content {
+ 'absent': {
+ File["/etc/lighttpd/vhosts.d/${name}.conf"]{
+ source => $vhost_source ? {
+ 'absent' => [
+ "puppet:///modules/site_lighttpd/vhosts.d/${::fqdn}/${name}.conf",
+ "puppet:///modules/site_lighttpd/vhosts.d/${lighttpd::cluster_node}/${name}.conf",
+ "puppet:///modules/site_lighttpd/vhosts.d/${::operatingsystem}.${::lsbdistcodename}/${name}.conf",
+ "puppet:///modules/site_lighttpd/vhosts.d/${::operatingsystem}/${name}.conf",
+ "puppet:///modules/site_lighttpd/vhosts.d/${name}.conf"
+ ],
+ default => "puppet:///${vhost_source}",
}
+ }
+ }
+ default: {
+ File["/etc/lighttpd/vhosts.d/${name}.conf"]{
+ content => $content,
+ }
}
+ }
}