This repository has been archived on 2020-08-19. You can view files and clone it, but cannot push or open issues or pull requests.
ansible-opendkim/tasks/main.yml

34 lines
790 B
YAML

- name: Generate OpenDKIM keys
command:
argv: ["opendkim-genkey", "-D", "/etc/opendkim-data/", "-d", "redxen.eu", "-s", "mail"]
tags:
- opendkim
- keygen
when: generate|default(false)
notify: Run service actions
- name: Copy OpenDKIM config
loop:
template:
src: 'opendkim.conf'
dest: '/etc/opendkim.conf'
follow: yes
owner: opendkim
mode: "700"
tags:
- opendkim
notify: Run service actions
- name: Copy OpenDKIM files
loop:
- 'keytable'
- 'signingtable'
- 'trustedhosts'
template:
src: '{{ item }}'
dest: '/etc/opendkim-data/{{ item }}'
follow: yes
owner: opendkim
mode: "700"
tags:
- opendkim
notify: Run service actions