1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- - name: 'Install opendkim packages'
- apt:
- pkg:
- - 'opendkim'
- install_recommends: 'no'
- state: 'present'
- tags:
- - 'dkim'
- - name: 'Install opendkim main configuration'
- template:
- src: 'opendkim/opendkim.conf.j2'
- dest: '/etc/opendkim.conf'
- owner: 'root'
- group: 'opendkim'
- mode: '0640'
- notify:
- - 'Restart opendkim'
- tags:
- - 'dkim'
- - name: 'Create opendkim config directory'
- file:
- path: '/etc/opendkim'
- state: 'directory'
- owner: 'root'
- group: 'opendkim'
- mode: '0750'
- tags:
- - 'dkim'
- - name: 'Install opendkim KeyTable'
- template:
- src: 'opendkim/KeyTable.j2'
- dest: '/etc/opendkim/KeyTable'
- owner: 'root'
- group: 'opendkim'
- mode: '0640'
- notify:
- - 'Restart opendkim'
- tags:
- - 'dkim'
- - name: 'Install opendkim SigningTable'
- template:
- src: 'opendkim/SigningTable.j2'
- dest: '/etc/opendkim/SigningTable'
- owner: 'root'
- group: 'opendkim'
- mode: '0640'
- notify:
- - 'Restart opendkim'
- tags:
- - 'dkim'
- - name: 'Install opendkim InternalHosts'
- template:
- src: 'opendkim/InternalHosts.j2'
- dest: '/etc/opendkim/InternalHosts'
- owner: 'root'
- group: 'opendkim'
- mode: '0640'
- notify:
- - 'Restart opendkim'
- tags:
- - 'dkim'
- - 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
- tags:
- - 'dkim'
- # vim: ft=yaml.ansible
|