2019-08-25 18:18:43 +00:00
|
|
|
---
|
|
|
|
- block:
|
|
|
|
- name: Install required packages for scan2mail
|
|
|
|
package:
|
|
|
|
name: "{{ item }}"
|
|
|
|
state: present
|
|
|
|
loop: "{{ scan2mail_packages_extra + __scan2mail_packages }}"
|
|
|
|
|
|
|
|
- name: Configure incron
|
|
|
|
template:
|
|
|
|
src: etc/incron.conf.j2
|
|
|
|
dest: /etc/incron.conf
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 0644
|
|
|
|
notify: __incron_restart
|
|
|
|
|
|
|
|
- name: Create incron job definition
|
|
|
|
template:
|
|
|
|
src: etc/incron.d/scan2mail.conf.j2
|
|
|
|
dest: "{{ scan2mail_incron_system_table_dir }}/scan2mail.conf"
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 0644
|
2020-02-12 18:03:21 +00:00
|
|
|
when: scan2mail_incron_jobs | length > 0
|
2019-08-25 18:18:43 +00:00
|
|
|
|
|
|
|
- name: Create scan2mail script
|
|
|
|
template:
|
|
|
|
src: usr/local/bin/scan2mail.j2
|
|
|
|
dest: /usr/local/bin/scan2mail
|
|
|
|
owner: root
|
|
|
|
group: root
|
2020-02-12 18:19:07 +00:00
|
|
|
mode: 0750
|
2019-08-25 18:18:43 +00:00
|
|
|
become: True
|
|
|
|
become_user: root
|