Specify direct path to acme.sh and remove mentions of letsencrypt/certbot

This commit is contained in:
staticsafe 2019-01-12 15:11:22 -05:00
parent cbc66a96a6
commit adcc82103f
2 changed files with 3 additions and 9 deletions

View File

@ -7,6 +7,6 @@
- name: Install acme.sh
shell: wget -O - https://get.acme.sh | sh
- name: Generate certificate using acme.sh
shell: acme.sh --issue --nginx -d {{ LOCAL_DOMAIN }}
shell: /root/.acme.sh/acme.sh --issue --nginx -d {{ LOCAL_DOMAIN }}
- name: Install certificate in storage directory
shell: 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 force-reload"

View File

@ -1,11 +1,10 @@
---
# This role install nginx, configures it
- name: Install nginx and certbot
- name: Install nginx
apt: name={{ item }} state=latest update_cache=yes
with_items:
- nginx
- letsencrypt
- name: Remove default nginx config in sites-enabled
file:
path: /etc/nginx/sites-enabled/default
@ -19,11 +18,6 @@
src: /etc/nginx/sites-available/{{ LOCAL_DOMAIN }}.conf
dest: /etc/nginx/sites-enabled/{{ LOCAL_DOMAIN }}.conf
state: link
- name: Copy and enable Let's Encrypt renew script
copy:
src: letsencrypt-renew.sh
dest: /etc/cron.daily/letsencrypt-renew.sh
mode: 0700
- name: Run nginx install tasks
include_tasks: install.yml
when: install is defined