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 c195ea9..1280595 100644 (file)
@@ -58,3 +58,9 @@
     dest: /etc/apache2/sites-available/000-default.conf
     src: templates/000-default.conf
   notify: apache
     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"