summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2014-07-07 05:30:48 +0200
committerGuilhem Moulin <guilhem@fripost.org>2015-06-07 02:52:36 +0200
commit065fdc8f78639593ae73532e01dda16fbbb3a727 (patch)
tree3e754b14a4aee0704aa57d8712bd5f1c174637ff
parent8fdaba4d764b9e534a0343746a3e30cf3f68852e (diff)
Generate the DKIM key on the outgoing instance only.
-rw-r--r--roles/amavis/tasks/main.yml4
1 files changed, 4 insertions, 0 deletions
diff --git a/roles/amavis/tasks/main.yml b/roles/amavis/tasks/main.yml
index 6965c07..da1f86a 100644
--- a/roles/amavis/tasks/main.yml
+++ b/roles/amavis/tasks/main.yml
@@ -35,12 +35,16 @@
state=directory
owner=root group=root
mode=0755
+ when: "'out' in group_names"
+ tags:
+ - genkey
- name: Generate a private key for DKIM signing
command: genkeypair.sh dkim --privkey=/var/lib/dkim/20140703.fripost.org.key -t rsa -b 1024
register: dkim
changed_when: dkim.rc == 0
failed_when: dkim.rc > 1
+ when: "'out' in group_names"
notify:
- Restart Amavis
- Publish the public key to the DNS zone