diff options
author | elijah <elijah@riseup.net> | 2015-09-03 23:24:43 -0700 |
---|---|---|
committer | elijah <elijah@riseup.net> | 2015-09-03 23:24:43 -0700 |
commit | 9d645a82c7346e8d585c664a82c719647a0d2ffa (patch) | |
tree | b4ae9a91fbfa83c01ecb20e5aa20fb0bbccf7c32 /puppet/modules/site_webapp/manifests/cron.pp | |
parent | da53a4a723cc05cfa39e066c64a9467d7efad04b (diff) |
make couchdb.admin.yml only readable by root, make non-admin cron run as webapp user.
Diffstat (limited to 'puppet/modules/site_webapp/manifests/cron.pp')
-rw-r--r-- | puppet/modules/site_webapp/manifests/cron.pp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/puppet/modules/site_webapp/manifests/cron.pp b/puppet/modules/site_webapp/manifests/cron.pp index d26ee312..7147a0d2 100644 --- a/puppet/modules/site_webapp/manifests/cron.pp +++ b/puppet/modules/site_webapp/manifests/cron.pp @@ -5,12 +5,14 @@ class site_webapp::cron { 'rotate_databases': command => 'cd /srv/leap/webapp && bundle exec rake db:rotate', environment => 'RAILS_ENV=production', + user => 'root', hour => [0,6,12,18], minute => 0; 'delete_tmp_databases': command => 'cd /srv/leap/webapp && bundle exec rake db:deletetmp', environment => 'RAILS_ENV=production', + user => 'root', hour => 1, minute => 1; @@ -19,6 +21,7 @@ class site_webapp::cron { 'remove_expired_sessions': command => 'cd /srv/leap/webapp && bundle exec rake cleanup:sessions', environment => 'RAILS_ENV=production', + user => 'leap-webapp', hour => 2, minute => 30, ensure => absent; @@ -26,6 +29,7 @@ class site_webapp::cron { 'remove_expired_tokens': command => 'cd /srv/leap/webapp && bundle exec rake cleanup:tokens', environment => 'RAILS_ENV=production', + user => 'leap-webapp', hour => 3, minute => 0; } |