Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
opendkim_port: 8891
opendkim_postfix: True
opendkim_TrustedHosts:
- 127.0.0.1
- localhost
2 changes: 0 additions & 2 deletions files/TrustedHosts

This file was deleted.

1 change: 1 addition & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
- include: opendkim.yml
- include: postfix.yml
when: "{{ opendkim_postfix == True }}"
4 changes: 2 additions & 2 deletions tasks/opendkim.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
file: path=/etc/opendkim/keys state=directory

- name: opendkim TrustedHosts present
copy: src=TrustedHosts dest=/etc/opendkim/TrustedHosts
template: src=TrustedHosts.j2 dest=/etc/opendkim/TrustedHosts
notify:
- restart opendkim

Expand Down Expand Up @@ -46,4 +46,4 @@
- restart opendkim

- name: opendkim is running
service: name=opendkim state=running enabled=yes
service: name=opendkim state=started enabled=yes
2 changes: 1 addition & 1 deletion tasks/postfix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@
dest: /etc/postfix/main.cf

- name: postfix is running
service: name=postfix state=running enabled=yes
service: name=postfix state=started enabled=yes
tags: postfix
3 changes: 3 additions & 0 deletions templates/TrustedHosts.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{% for host in opendkim_TrustedHosts %}
{{ host }}
{% endfor %}