summaryrefslogtreecommitdiff
path: root/puppet/modules/site_webapp
diff options
context:
space:
mode:
Diffstat (limited to 'puppet/modules/site_webapp')
-rw-r--r--puppet/modules/site_webapp/manifests/cron.pp19
-rw-r--r--puppet/modules/site_webapp/manifests/init.pp1
2 files changed, 20 insertions, 0 deletions
diff --git a/puppet/modules/site_webapp/manifests/cron.pp b/puppet/modules/site_webapp/manifests/cron.pp
new file mode 100644
index 00000000..be997103
--- /dev/null
+++ b/puppet/modules/site_webapp/manifests/cron.pp
@@ -0,0 +1,19 @@
+class site_webapp::cron {
+
+ # cron tasks that need to be performed to cleanup the database
+ cron {
+ 'remove_expired_sessions':
+ command => 'bundle exec rake cleanup:sessions',
+ cwd => '/srv/leap/webapp',
+ environment => 'RAILS_ENV=production',
+ hour => 2,
+ minute => 30;
+
+ 'remove_expired_tokens':
+ command => 'bundle exec rake cleanup:tokens',
+ cwd => '/srv/leap/webapp',
+ environment => 'RAILS_ENV=production',
+ hour => 3,
+ minute => 0;
+ }
+}
diff --git a/puppet/modules/site_webapp/manifests/init.pp b/puppet/modules/site_webapp/manifests/init.pp
index c090c6a0..cb94d328 100644
--- a/puppet/modules/site_webapp/manifests/init.pp
+++ b/puppet/modules/site_webapp/manifests/init.pp
@@ -17,6 +17,7 @@ class site_webapp {
include site_webapp::apache
include site_webapp::couchdb
include site_webapp::haproxy
+ include site_webapp::cron
include site_config::x509::cert
include site_config::x509::key
include site_config::x509::ca