From 065fdc8f78639593ae73532e01dda16fbbb3a727 Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Mon, 7 Jul 2014 05:30:48 +0200 Subject: Generate the DKIM key on the outgoing instance only. --- roles/amavis/tasks/main.yml | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'roles/amavis') 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 -- cgit v1.2.3