From 138aca9f4d9921d918881e9f7eb2ee3da6fbdcb0 Mon Sep 17 00:00:00 2001
From: Alexander Olofsson <alexander.olofsson@liu.se>
Date: Tue, 28 Aug 2018 15:08:36 +0200
Subject: [PATCH] Add a cron entry to run Laravel tasks

---
 manifests/init.pp | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/manifests/init.pp b/manifests/init.pp
index 81685dd..d202590 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -155,6 +155,18 @@ class skadereg(
     subscribe   => Vcsrepo['/var/www/skadereg'],
   }
 
+  cron { 'artisan schedule:run':
+    minute      => '*',
+    hour        => '*',
+    date        => '*',
+    month       => '*',
+    weekday     => '*',
+    user        => 'apache',
+    group       => 'skadereg',
+    environment => [ 'PATH=/opt/rh/rh-php56/root/usr/bin:/usr/bin:/bin', 'SHELL=/bin/bash' ],
+    command     => 'php /var/www/skadereg/artisan schedule:run &> /dev/null',
+  }
+
   $db_name = 'homestead'
 
   class { '::mysql::server':
-- 
GitLab