mirror of
https://github.com/krislamo/vagrant-easyredmine
synced 2024-11-10 06:50:35 +00:00
add redmine_receive_imap cron
This commit is contained in:
parent
6e0c9d7a8a
commit
2a3e519f0e
@ -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
|
||||||
|
|
||||||
|
14
roles/easyredmine/templates/redmine_receive_imap.j2
Executable file
14
roles/easyredmine/templates/redmine_receive_imap.j2
Executable 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 }}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user