From 682bfbb0cb1a80e86a552fe2e1411ae654c757e1 Mon Sep 17 00:00:00 2001 From: mh Date: Tue, 16 Oct 2012 21:24:47 +0200 Subject: dependency on package --- manifests/config/file.pp | 16 ++++++++++------ 1 file 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}", } } } -- cgit v1.2.3