summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2012-10-16 21:24:47 +0200
committermh <mh@immerda.ch>2012-10-16 21:24:47 +0200
commit682bfbb0cb1a80e86a552fe2e1411ae654c757e1 (patch)
treef062603b817ab1f55100f54b9df0128bcc995c6c
parent9ae989d30df8778c9c67dded8c1f3211ca46f73c (diff)
downloadpuppet-lighttpd-682bfbb0cb1a80e86a552fe2e1411ae654c757e1.tar.gz
puppet-lighttpd-682bfbb0cb1a80e86a552fe2e1411ae654c757e1.tar.bz2
dependency on package
-rw-r--r--manifests/config/file.pp16
1 files changed, 10 insertions, 6 deletions
diff --git a/manifests/config/file.pp b/manifests/config/file.pp
index c703834..812a737 100644
--- a/manifests/config/file.pp
+++ b/manifests/config/file.pp
@@ -1,17 +1,21 @@
+# manages a config file for lighty
define lighttpd::config::file(
$ensure = present,
$conf_source = 'absent',
$content = 'absent'
){
$conf_dir = $::operatingsystem ? {
- debian => '/etc/lighttpd/conf-available',
- ubuntu => '/etc/lighttpd/conf-available',
+ debian => '/etc/lighttpd/conf-available',
+ ubuntu => '/etc/lighttpd/conf-available',
default => '/etc/lighttpd/conf.d'
}
file{"${conf_dir}/${name}.conf":
- ensure => $ensure,
- notify => Service['lighttpd'],
- owner => root, group => 0, mode => 0644;
+ ensure => $ensure,
+ require => Package['lighttpd'],
+ notify => Service['lighttpd'],
+ owner => 'root',
+ group => 0,
+ mode => '0644';
}
case $content {
@@ -29,7 +33,7 @@ define lighttpd::config::file(
"puppet:///modules/lighttpd/conf.d/${::operatingsystem}/${name}.conf",
"puppet:///modules/lighttpd/conf.d/${name}.conf"
],
- default => "puppet:///$conf_source",
+ default => "puppet:///${conf_source}",
}
}
}