summaryrefslogtreecommitdiff
path: root/manifests/config
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2014-04-19 18:21:40 +0200
committermh <mh@immerda.ch>2014-04-19 18:23:03 +0200
commit2adb39b5c7905b22955f375dfebdcd0cb20d69ff (patch)
tree67d49cd379bf38d244c07ab0a675a342238da76f /manifests/config
parente14622cd4495a9c0ccae391f6168dec21dba0985 (diff)
parent2f2aa65dafc57db6ab6d60db7ea18059840ad927 (diff)
Merge remote-tracking branch 'lavamind/master'
Conflicts: manifests/config/file.pp manifests/vhost/php/standard.pp
Diffstat (limited to 'manifests/config')
-rw-r--r--manifests/config/file.pp21
1 files changed, 17 insertions, 4 deletions
diff --git a/manifests/config/file.pp b/manifests/config/file.pp
index 29e6736..74d289d 100644
--- a/manifests/config/file.pp
+++ b/manifests/config/file.pp
@@ -32,9 +32,21 @@ define apache::config::file(
group => 0,
mode => '0644';
}
- if $ensure == 'present' {
- case $content {
- 'absent': {
+
+ case $ensure {
+ 'absent', 'purged': {
+ # We want to avoid all stuff related to source and content
+ }
+ 'link': {
+ if $target != false {
+ File["apache_${name}"] {
+ target => $target,
+ }
+ }
+ }
+ default: {
+ case $content {
+ 'absent': {
$real_source = $source ? {
'absent' => [
"puppet:///modules/site_apache/${confdir}/${::fqdn}/${name}",
@@ -49,7 +61,7 @@ define apache::config::file(
default => $source
}
File["apache_${name}"]{
- source => $real_source,
+ source => $real_source,
}
}
default: {
@@ -78,6 +90,7 @@ define apache::config::file(
}
}
}
+ }
}
}
}