123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- - name: 'Install opendkim packages'
- apt:
- pkg: '{{ item }}'
- install_recommends: 'no'
- state: 'installed'
- update_cache: 'yes'
- with_items:
- - 'opendkim'
- when: with_opendkim
- - name: 'Install opendkim main configuration'
- template:
- src: 'opendkim/opendkim.conf.j2'
- dest: '/etc/opendkim.conf'
- owner: 'root'
- group: 'opendkim'
- mode: '0640'
- notify:
- - 'Restart opendkim'
- when: with_opendkim
- - name: 'Create opendkim config directory'
- file:
- path: '/etc/opendkim'
- state: 'directory'
- owner: 'root'
- group: 'opendkim'
- mode: '0750'
- when: with_opendkim
- - name: 'Install opendkim KeyTable'
- template:
- src: 'opendkim/KeyTable.j2'
- dest: '/etc/opendkim/KeyTable'
- owner: 'root'
- group: 'opendkim'
- mode: '0640'
- notify:
- - 'Restart opendkim'
- when: with_opendkim
- - name: 'Install opendkim SigningTable'
- template:
- src: 'opendkim/SigningTable.j2'
- dest: '/etc/opendkim/SigningTable'
- owner: 'root'
- group: 'opendkim'
- mode: '0640'
- notify:
- - 'Restart opendkim'
- when: with_opendkim
- - name: 'Install opendkim InternalHosts'
- template:
- src: 'opendkim/InternalHosts.j2'
- dest: '/etc/opendkim/InternalHosts'
- owner: 'root'
- group: 'opendkim'
- mode: '0640'
- notify:
- - 'Restart opendkim'
- when: with_opendkim
- - name: 'Install DKIM private keys'
- copy:
- content: "{{lookup('file', 'data/dkim/' + item + '.pem')}}"
- dest: '/etc/opendkim/{{ item }}_default.pem'
- owner: 'root'
- group: 'opendkim'
- mode: '0640'
- with_items: dkim_domains
- when: dkim_domains
|