From 4ef9586d2accb0782ff95bef23631fb408a09eec Mon Sep 17 00:00:00 2001 From: Bombar Maxime Date: Sun, 10 May 2020 13:46:30 +0200 Subject: [PATCH] Wildcard certificate on MX servers. For the sake of completeness I commit this play. --- certbot.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100755 certbot.yml diff --git a/certbot.yml b/certbot.yml new file mode 100755 index 00000000..6a6a3eb5 --- /dev/null +++ b/certbot.yml @@ -0,0 +1,34 @@ +#!/usr/bin/env ansible-playbook +--- +# Temporary +# Wildcard certificate for MX servers +- hosts: titanic.adm.crans.org + vars: + certbot: + dns_rfc2136_name: certbot_challenge. + dns_rfc2136_secret: "{{ vault_certbot_dns_secret }}" + mail: root@crans.org + certname: crans.org + domains: "*.crans.org" + bind: + masters: "{{ lookup('re2oapi', 'get_role', 'dns-authoritary-master')[0] }}" + roles: + - certbot + tasks: + - name: Symlink smtp certificate + file: + src: /etc/letsencrypt/live/crans.org/fullchain.pem + dest: /etc/ssl/certs/smtp.pem + state: link + force: true + - name: Symlink smtp private key + file: + src: /etc/letsencrypt/live/crans.org/privkey.pem + dest: /etc/ssl/private/smtp.pem + state: link + force: true + - name: reload postfix + systemd: + enabled: yes + state: restarted + name: postfix