Merge branch 'master' of adellam/ansible-roles into master

This commit is contained in:
Andrea Dell'Amico 2019-10-15 15:48:19 +02:00 committed by Gitea
commit 8f0f4e602c
3 changed files with 29 additions and 0 deletions

View File

@ -33,6 +33,14 @@ redmine_glob_user: www-data
redmine_glob_group: www-data redmine_glob_group: www-data
redmine_glob_users_home_base: /srv/redmine-home 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 # Plugins
rm_ldap_auth: False rm_ldap_auth: False
rm_ldap_synch: False rm_ldap_synch: False

View File

@ -107,4 +107,21 @@
template: src=redmine-logrotate.j2 dest=/etc/logrotate.d/redmine-{{ redmine_inst_name }} owner=root group=root mode=0444 template: src=redmine-logrotate.j2 dest=/etc/logrotate.d/redmine-{{ redmine_inst_name }} owner=root group=root mode=0444
tags: [ 'redmine', 'logrotate' ] 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 tags: redmine

View File

@ -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