From 08f6c9b218893ea94b3611d687a56090e7fea5b2 Mon Sep 17 00:00:00 2001 From: Gabriel Filion Date: Mon, 19 Sep 2011 15:11:32 -0400 Subject: config: Implement config files as links Some packages in Debian manage an Apache config file in their own /etc directory and create a link to that file in Apache's conf.d directory. One example package that does this is nagios3. Introduce a new argument, $target, that can be used to specify the link destination. When using $target, the value to $ensure must also be 'link' to make the file into a symbolic link. This is to make it explicit when we want the apache::config::file to behave differently than the normal behaviour of creating a plain text file in conf.d. Signed-off-by: Gabriel Filion --- manifests/config/include.pp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'manifests/config/include.pp') diff --git a/manifests/config/include.pp b/manifests/config/include.pp index b58073f..4d676f0 100644 --- a/manifests/config/include.pp +++ b/manifests/config/include.pp @@ -1,12 +1,14 @@ # deploy apache configuration file (includes for vhosts) define apache::config::include( $ensure = present, + $target = false, $source = 'absent', $content = 'absent', $destination = 'absent' ){ apache::config::file { "${name}": ensure => $ensure, + target => $target, type => 'include', source => $source, content => $content, -- cgit v1.2.3