|
@@ -26,16 +26,13 @@
|
26
|
26
|
|
27
|
27
|
- name: Create database for OpenDMARC reports
|
28
|
28
|
mysql_db: name={{ mail_db_opendmarc_database }} state=present
|
29
|
|
-
|
30
|
|
-- name: Import database schema for OpenDMARC reports
|
31
|
|
- mysql_db: name={{ mail_db_opendmarc_database }} state=import target=/usr/share/doc/opendmarc/schema.mysql
|
32
|
|
- tags: import_mysql_postfix
|
|
29
|
+ notify: import opendmarc schema
|
33
|
30
|
|
34
|
31
|
- name: Copy nightly OpenDMARC report generation script into place
|
35
|
32
|
template: src=etc_opendmarc_report.sh.j2 dest=/etc/opendmarc/report.sh owner=root group=root mode="755"
|
36
|
33
|
|
37
|
|
-- name: Touch initial report dat file with correct permissions
|
38
|
|
- file: path=/var/run/opendmarc/opendmarc.dat state=touch owner=opendmarc group=opendmarc
|
|
34
|
+- name: Ensure initial report dat file exists with correct permissions
|
|
35
|
+ copy: content="" dest=/var/run/opendmarc/opendmarc.dat owner=opendmarc group=opendmarc
|
39
|
36
|
|
40
|
37
|
- name: Activate OpenDMARC report cronjob
|
41
|
38
|
cron: name="OpenDMARC report" hour="2" minute="0" job="/bin/bash /etc/opendmarc/report.sh >> /var/log/opendmarc_report.log 2>&1 || tail /var/log/opendmarc_report.log"
|