summaryrefslogtreecommitdiff
path: root/puppet/modules/site_apache/manifests
diff options
context:
space:
mode:
Diffstat (limited to 'puppet/modules/site_apache/manifests')
-rw-r--r--puppet/modules/site_apache/manifests/common.pp1
-rw-r--r--puppet/modules/site_apache/manifests/common/autorestart.pp18
2 files changed, 19 insertions, 0 deletions
diff --git a/puppet/modules/site_apache/manifests/common.pp b/puppet/modules/site_apache/manifests/common.pp
index 208c15d5..4847cbe3 100644
--- a/puppet/modules/site_apache/manifests/common.pp
+++ b/puppet/modules/site_apache/manifests/common.pp
@@ -28,5 +28,6 @@ class site_apache::common {
include site_apache::common::tls
include site_apache::common::acme
+ include site_apache::common::autorestart
}
diff --git a/puppet/modules/site_apache/manifests/common/autorestart.pp b/puppet/modules/site_apache/manifests/common/autorestart.pp
new file mode 100644
index 00000000..0273f272
--- /dev/null
+++ b/puppet/modules/site_apache/manifests/common/autorestart.pp
@@ -0,0 +1,18 @@
+#
+# Adds autorestart extension to apache on crash
+#
+class site_apache::common::autorestart {
+
+ 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 => [
+ File['/etc/systemd/system/apache2.service.d'],
+ Service['apache'],
+ ]
+ }
+}