From: Silvio Rhatto Date: Sun, 8 Nov 2009 15:58:55 +0000 (-0200) Subject: Docroot back as a normal resource, but testing for multiple definitions X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=5253b1335ef5974fb31b00faec70738e43a9857b;p=puppet-apache.git Docroot back as a normal resource, but testing for multiple definitions --- diff --git a/manifests/init.pp b/manifests/init.pp index 287b2f5..f8dd454 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -108,12 +108,13 @@ class apache { && [ ${apache2_sites}-enabled/$name -ef ${apache2_sites}-available/$name ]'", notify => Exec["reload-apache2"], } - @file { "${docroot}": - ensure => directory, - owner => root, - group => root, - mode => 0755, - tag => "apache_docroot", + if !defined(File["${docroot}"]) { + file { "${docroot}": + ensure => directory, + owner => root, + group => root, + mode => 0755, + } } } 'absent': { @@ -166,7 +167,4 @@ class apache { command => "/etc/init.d/apache2 force-reload", refreshonly => true, } - - # Realize all docroot resources - File <| tag == "apache_docroot" |> }