X-Git-Url: https://git.ralfj.de/ansible.git/blobdiff_plain/a0ef97a3169e9da8b4618116075d54c49b4292b4..b0a3d55a55872fe9f0a79d2cef263ca89f2698af:/roles/email/tasks/opendkim.yml?ds=inline diff --git a/roles/email/tasks/opendkim.yml b/roles/email/tasks/opendkim.yml index 1ac9e5a..8da35b3 100644 --- a/roles/email/tasks/opendkim.yml +++ b/roles/email/tasks/opendkim.yml @@ -10,11 +10,14 @@ src: templates/opendkim.env - name: regenerate opendkim service when: opendkim_env.changed - shell: /lib/opendkim/opendkim.service.generate && systemctl daemon-reload + shell: /lib/opendkim/opendkim.service.generate && chmod +r /etc/systemd/system/opendkim.service.d/ -R && systemctl daemon-reload && systemd-tmpfiles /etc/tmpfiles.d/opendkim.conf --create notify: opendkim # tables +- name: create opendkim dir + file: name=/etc/opendkim state=directory owner=opendkim - name: generate opendkim keys shell: mkdir /etc/opendkim/{{ item }}/ && opendkim-genkey --bits=2048 -s mail -d {{ item }} -D /etc/opendkim/{{ item }}/ + become_user: opendkim args: creates: /etc/opendkim/{{ item }}/mail.private warn: False