add cronjob to make sure that apache is running
authorRalf Jung <post@ralfj.de>
Tue, 31 Jul 2018 18:56:32 +0000 (20:56 +0200)
committerRalf Jung <post@ralfj.de>
Tue, 31 Jul 2018 18:56:32 +0000 (20:56 +0200)
roles/apache/tasks/main.yml

index c195ea935d346f2b8232048bb4732b54cf02ede8..1280595d07711aa74819f66ad5deb0c8bf60e680 100644 (file)
@@ -58,3 +58,9 @@
     dest: /etc/apache2/sites-available/000-default.conf
     src: templates/000-default.conf
   notify: apache
+# work-arounds and hacks
+- name: cronjob to fix apache startup
+  cron:
+    name: "apache2-start-fix"
+    minute: "*/5"
+    job: "if systemctl is-failed apache2 >/dev/null; then echo 'restarting apache'; systemctl restart apache2; fi"