説明なし
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

opendmarc.yml 1.6KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. - name: Install OpenDMARC milter and related packages
  2. apt: pkg={{ item }} state=installed update_cache=yes
  3. with_items:
  4. - mysql-server
  5. - python-mysqldb
  6. - opendmarc
  7. - name: Copy OpenDMARC configuration file into place
  8. template: src=etc_opendmarc.conf.j2 dest=/etc/opendmarc.conf owner=root group=root
  9. notify: restart opendmarc
  10. - name: Create OpenDMARC configuration directory
  11. file: state=directory path=/etc/opendmarc
  12. - name: Copy OpenDMARC ignore hosts file into place
  13. template: src=etc_opendmarc_ignore.hosts.j2 dest=/etc/opendmarc/ignore.hosts owner=root group=root
  14. - name: Copy OpenDMARC defaults file into place
  15. copy: src=etc_default_opendmarc dest=/etc/default/opendmarc owner=root group=root
  16. notify:
  17. - restart opendmarc
  18. - restart postfix
  19. - name: Create database user for OpenDMARC reports
  20. mysql_user: user={{ mail_db_opendmarc_username }} password={{ mail_db_opendmarc_password }} state=present priv="opendmarc.*:ALL"
  21. - name: Create database for OpenDMARC reports
  22. mysql_db: name={{ mail_db_opendmarc_database }} state=present
  23. notify: import opendmarc schema
  24. - name: Copy nightly OpenDMARC report generation script into place
  25. template: src=etc_opendmarc_report.sh.j2 dest=/etc/opendmarc/report.sh owner=root group=root mode="755"
  26. - name: Ensure initial report dat file exists with correct permissions
  27. copy: content="" dest=/var/run/opendmarc/opendmarc.dat owner=opendmarc group=opendmarc
  28. - name: Activate OpenDMARC report cronjob
  29. 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"