forked from ISTI-ansible-roles/ansible-roles
Merge branch 'master' of adellam/ansible-roles into master
This commit is contained in:
commit
8f0f4e602c
|
@ -33,6 +33,14 @@ redmine_glob_user: www-data
|
|||
redmine_glob_group: www-data
|
||||
redmine_glob_users_home_base: /srv/redmine-home
|
||||
|
||||
redmine_imap_sync: False
|
||||
redmine_imap_server: localhost
|
||||
redmine_imap_user: ''
|
||||
#redmine_imap_password: 'Use a vault file'
|
||||
redmine_imap_unknown_user_action: ignore
|
||||
redmine_imap_starttls: true
|
||||
redmine_imap_sync_additional_options: ''
|
||||
|
||||
# Plugins
|
||||
rm_ldap_auth: False
|
||||
rm_ldap_synch: False
|
||||
|
|
|
@ -107,4 +107,21 @@
|
|||
template: src=redmine-logrotate.j2 dest=/etc/logrotate.d/redmine-{{ redmine_inst_name }} owner=root group=root mode=0444
|
||||
tags: [ 'redmine', 'logrotate' ]
|
||||
|
||||
- name: Install a script that syncs the email to redmine reading from a imap account
|
||||
template: src=redmine-imap-sync.j2 dest=/usr/local/bin/redmine-imap-sync owner=root group={{ redmine_user }} mode=0750
|
||||
when: redmine_imap_sync | bool
|
||||
tags: [ 'redmine', 'redmine_imap' ]
|
||||
|
||||
- name: Install a cron job that configures the task that reads emails via imap
|
||||
cron:
|
||||
cron_file: redmine-email-sync
|
||||
disabled: no
|
||||
job: '/usr/local/bin/redmine-imap-sync'
|
||||
user: '{{ redmine_user }}'
|
||||
minute: '*/10'
|
||||
name: 'Redmine update tasks by email'
|
||||
state: present
|
||||
when: redmine_imap_sync | bool
|
||||
tags: [ 'redmine', 'redmine_imap' ]
|
||||
|
||||
tags: redmine
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
#!/bin/bash
|
||||
|
||||
rake -f {{ redmine_glob_root_dir }}/{{ redmine_inst_dir }}/Rakefile redmine:email:receive_imap RAILS_ENV="production" host={{ redmine_imap_server }} username={{ redmine_imap_user }} password='{{ redmine_imap_password }}' unknown_user={{ redmine_imap_unknown_user_action }} starttls={{ redmine_imap_starttls }} {{ redmine_imap_sync_additional_options }} >> {{ redmine_glob_root_dir }}/{{ redmine_inst_dir }}/log/imap_sync.log 2>&1
|
||||
|
Loading…
Reference in New Issue