From 3e46b304132b5a48a98c1d47e0a02bf157e9dc02 Mon Sep 17 00:00:00 2001 From: William Yardley Date: Fri, 7 Oct 2016 21:33:57 -0700 Subject: [PATCH] 'Require' vhost dir / enable dir in files created in those directories #895 --- manifests/resource/vhost.pp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/manifests/resource/vhost.pp b/manifests/resource/vhost.pp index 0f1f4d82d..3e17d581b 100644 --- a/manifests/resource/vhost.pp +++ b/manifests/resource/vhost.pp @@ -593,10 +593,11 @@ } concat { $config_file: - owner => $owner, - group => $group, - mode => $mode, - notify => Class['::nginx::service'], + owner => $owner, + group => $group, + mode => $mode, + notify => Class['::nginx::service'], + require => [File[$vhost_dir], File[$vhost_enable_dir]], } $ssl_only = ($ssl == true) and (($ssl_port + 0) == ($listen_port + 0)) @@ -704,7 +705,7 @@ ensure => $vhost_symlink_ensure, path => "${vhost_enable_dir}/${name_sanitized}.conf", target => $config_file, - require => Concat[$config_file], + require => [File[$vhost_dir], File[$vhost_enable_dir], Concat[$config_file]], notify => Class['::nginx::service'], }