diff options
author | mh <mh@immerda.ch> | 2010-08-11 14:42:44 +0200 |
---|---|---|
committer | mh <mh@immerda.ch> | 2010-08-11 14:42:44 +0200 |
commit | d275f9db71ffd55aeef9e96b9f923d1169dcaba9 (patch) | |
tree | a93616af827828e7903e43f9bfcb9eca27e0dcc4 /manifests/vhost/template.pp | |
parent | 747054969e709681072426ff2c9ef3446ba7ceb8 (diff) |
only manage source or content if file should be present
Diffstat (limited to 'manifests/vhost/template.pp')
-rw-r--r-- | manifests/vhost/template.pp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/manifests/vhost/template.pp b/manifests/vhost/template.pp index c1c9935..d7e9e07 100644 --- a/manifests/vhost/template.pp +++ b/manifests/vhost/template.pp @@ -85,11 +85,6 @@ define apache::vhost::template( 'absent' => "$real_path/logs", default => $logpath } - if $ensure != 'absent' { - case $logmode { - 'semianonym','anonym': { include apache::noiplog } - } - } $servername = $domain ? { 'absent' => $name, @@ -148,11 +143,18 @@ define apache::vhost::template( apache::vhost::file{$name: ensure => $ensure, - content => template("apache/vhosts/$template_mode/$operatingsystem.erb"), do_includes => $do_includes, htpasswd_file => $htpasswd_file, htpasswd_path => $htpasswd_path, use_mod_macro => $use_mod_macro, } + if $ensure != 'absent' { + case $logmode { + 'semianonym','anonym': { include apache::noiplog } + } + Apache::Vhost::File[$name]{ + content => template("apache/vhosts/$template_mode/$operatingsystem.erb") + } + } } |