1
0
mirror of https://github.com/krislamo/vagrant-easyredmine synced 2024-12-16 15:30:34 +00:00

add redmine_receive_imap cron

This commit is contained in:
Mark Heiges 2015-12-23 13:02:36 -05:00
parent 6e0c9d7a8a
commit 2a3e519f0e
2 changed files with 30 additions and 2 deletions

View File

@ -41,6 +41,12 @@
mode=750 mode=750
sudo: no sudo: no
- name: add redmine IMAP fetch script
template: dest='{{ redmine_root_dir }}/script/redmine_receive_imap'
src=redmine_receive_imap.j2
mode=750
sudo: no
- name: delete contents of redmine root directory - name: delete contents of redmine root directory
file: path='{{ redmine_root_dir }}' file: path='{{ redmine_root_dir }}'
state=absent state=absent
@ -76,9 +82,17 @@
sudo: no sudo: no
when: do_redmine_installer == True when: do_redmine_installer == True
- name: adding crontab - name: adding run_tasks crontab
cron: name="redmine tasks" cron: name="redmine tasks"
minute="*/15" minute="*/15"
job='cd {{ redmine_root_dir }} && /usr/local/bin/bundle exec rake easyproject:scheduler:run_tasks RAILS_ENV=production > /dev/null' job='cd {{ redmine_root_dir }} && /usr/local/bin/bundle exec rake easyproject:scheduler:run_tasks RAILS_ENV=production > /dev/null'
user='{{ redmine_owner }}' user='{{ redmine_owner }}'
sudo: yes sudo: yes
- name: adding redmine_receive_imap crontab
cron: name="fetch from imap"
minute="*/5"
job="({{ redmine_root_dir }}/script/redmine_receive_imap 2>&1 | sed '/install RDoc/d') >> {{ redmine_root_dir }}/log/redmine_receive_imap"
user='{{ redmine_owner }}'
sudo: yes

View File

@ -0,0 +1,14 @@
#!/bin/bash
cd {{ redmine_root_dir }}
/usr/local/bin/bundle exec rake \
redmine:email:receive_imap \
RAILS_ENV="production" \
project=sysdba \
allow_override=project,tracker,priority,category \
host=imap.gmail.com \
port=993 ssl=SSL \
username={{ smtp_username }} \
password={{ smtp_password }}