From cc82212c993339f82cf95c7d11580b9b74b53bfa Mon Sep 17 00:00:00 2001 From: staticsafe Date: Sat, 12 Jan 2019 15:28:06 -0500 Subject: [PATCH] add a pre-hook to stop nginx for standalone mode --- roles/mastodon-nginx/tasks/install.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/mastodon-nginx/tasks/install.yml b/roles/mastodon-nginx/tasks/install.yml index 37582b9..e170bbd 100644 --- a/roles/mastodon-nginx/tasks/install.yml +++ b/roles/mastodon-nginx/tasks/install.yml @@ -7,6 +7,6 @@ - name: Install acme.sh shell: wget -O - https://get.acme.sh | sh - name: Generate certificate using acme.sh - shell: /root/.acme.sh/acme.sh --issue -d {{ LOCAL_DOMAIN }} + shell: /root/.acme.sh/acme.sh --issue --standalone -d {{ LOCAL_DOMAIN }} --pre-hook "service nginx stop" - name: Install certificate in storage directory - shell: /root/.acme.sh/acme.sh --install-cert -d {{ LOCAL_DOMAIN }} --key-file /etc/ssl/letsencrypt/{{ LOCAL_DOMAIN }}.pem --fullchain-file /etc/ssl/letsencrypt/{{ LOCAL_DOMAIN }}.crt --reloadcmd "service nginx force-reload" + shell: /root/.acme.sh/acme.sh --install-cert -d {{ LOCAL_DOMAIN }} --key-file /etc/ssl/letsencrypt/{{ LOCAL_DOMAIN }}.pem --fullchain-file /etc/ssl/letsencrypt/{{ LOCAL_DOMAIN }}.crt --reloadcmd "service nginx restart"