summaryrefslogtreecommitdiff
path: root/puppet/modules/site_apache/manifests
diff options
context:
space:
mode:
authorTulio Casagrande <tcasagra@thoughtworks.com>2017-01-17 15:18:30 -0200
committervarac <varacanero@zeromail.org>2017-01-18 18:44:21 +0100
commitc74a1f3c1eea0bb359bfa3bd7d6b37e720f9a991 (patch)
tree96135e4aed98a2e366d5ba1c05b37e2cdeebf901 /puppet/modules/site_apache/manifests
parente1767f48c04a469f00a414c2bd85ec2ed0eceb7f (diff)
Ensure the directory exists before creating the file
with @aarni
Diffstat (limited to 'puppet/modules/site_apache/manifests')
-rw-r--r--puppet/modules/site_apache/manifests/common/autorestart.pp12
1 files changed, 10 insertions, 2 deletions
diff --git a/puppet/modules/site_apache/manifests/common/autorestart.pp b/puppet/modules/site_apache/manifests/common/autorestart.pp
index f8213439..0273f272 100644
--- a/puppet/modules/site_apache/manifests/common/autorestart.pp
+++ b/puppet/modules/site_apache/manifests/common/autorestart.pp
@@ -3,8 +3,16 @@
#
class site_apache::common::autorestart {
- ::systemd::unit_file { '/etc/systemd/system/apache2.service.d/autorestart.conf':
+ file { '/etc/systemd/system/apache2.service.d':
+ ensure => directory,
+ mode => '0755',
+ }
+
+ ::systemd::unit_file { 'apache2.service.d/autorestart.conf':
source => 'puppet:///modules/site_apache/autorestart.conf',
- require => Service['apache'],
+ require => [
+ File['/etc/systemd/system/apache2.service.d'],
+ Service['apache'],
+ ]
}
}