add a pre-hook to stop nginx for standalone mode

This commit is contained in:
staticsafe 2019-01-12 15:28:06 -05:00
parent 802423460a
commit cc82212c99
1 changed files with 2 additions and 2 deletions

View File

@ -7,6 +7,6 @@
- name: Install acme.sh - name: Install acme.sh
shell: wget -O - https://get.acme.sh | sh shell: wget -O - https://get.acme.sh | sh
- name: Generate certificate using acme.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 - 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"