From 73cbf6a1a82361f8563a881c7428211ff7a98ab1 Mon Sep 17 00:00:00 2001 From: Edoardo Putti Date: Sun, 11 Feb 2018 10:55:33 +0100 Subject: [PATCH] ubnind port 80 during certificate request --- roles/certbot/tasks/main.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/roles/certbot/tasks/main.yaml b/roles/certbot/tasks/main.yaml index 95f1b26..66004b4 100644 --- a/roles/certbot/tasks/main.yaml +++ b/roles/certbot/tasks/main.yaml @@ -10,6 +10,11 @@ - sendmail-bin - cron +- name: Shutdown webservers + service: + name: "{{ webserver_name }}" + state: stopped + - name: request certificate command: certbot certonly -a standalone --agree-tos --email roots@lists.lilik.it --preferred-challenges http -d {{ server_fqdn }} -d www.{{ server_fqdn }} -n args: @@ -21,3 +26,8 @@ # minute: "30" # hour: "2" # job: '/usr/bin/certbot renew -n --renew-hook "/bin/systemctl reload {{ webserver_name }}"' + +- name: Restart webservers + service: + name: "{{ webserver_name }}" + state: started