From bf36cacc89ebdf45299011c5fc7d03d33580b6dc Mon Sep 17 00:00:00 2001 From: staticsafe Date: Sun, 8 Apr 2018 14:34:49 -0400 Subject: [PATCH] Remove LetsEncrypt role, it is no longer useful. --- .../roles/letsencrypt/files/letsencrypt-renew | 3 -- ubuntu/roles/letsencrypt/handlers/main.yml | 3 -- ubuntu/roles/letsencrypt/tasks/main.yml | 31 ------------------- ubuntu/site.yml | 7 ----- 4 files changed, 44 deletions(-) delete mode 100755 ubuntu/roles/letsencrypt/files/letsencrypt-renew delete mode 100644 ubuntu/roles/letsencrypt/handlers/main.yml delete mode 100644 ubuntu/roles/letsencrypt/tasks/main.yml diff --git a/ubuntu/roles/letsencrypt/files/letsencrypt-renew b/ubuntu/roles/letsencrypt/files/letsencrypt-renew deleted file mode 100755 index 6e64117..0000000 --- a/ubuntu/roles/letsencrypt/files/letsencrypt-renew +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash -letsencrypt renew -service nginx reload diff --git a/ubuntu/roles/letsencrypt/handlers/main.yml b/ubuntu/roles/letsencrypt/handlers/main.yml deleted file mode 100644 index 5d9d338..0000000 --- a/ubuntu/roles/letsencrypt/handlers/main.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -- name: restart cron - service: name=cron state=restarted diff --git a/ubuntu/roles/letsencrypt/tasks/main.yml b/ubuntu/roles/letsencrypt/tasks/main.yml deleted file mode 100644 index 7d3e92f..0000000 --- a/ubuntu/roles/letsencrypt/tasks/main.yml +++ /dev/null @@ -1,31 +0,0 @@ ---- -- name: Install LetsEncrypt client - apt: name=letsencrypt state=latest - -- name: stop nginx if it already is up and running - service: name=nginx state=stopped - register: result - ignore_errors: True - -- name: Generate LetsEncrypt TLS certificates - shell: letsencrypt certonly -n -m "letsencrypt@sadiqsaif.ca" --agree-tos --webroot -d {{ item }} -w /srv/www/{{ item }}/ - with_items: - - asininetech.com - - entropynet.net - - i.asininetech.com - - sadiqsaif.ca - - staticsafe.ca - - twoshadesofbrown.com - - wiki.staticsafe.ca - - sadiqsaif.com - - netdata.asininetech.net - -- name: start nginx if we stopped it before - service: name=nginx state=started - when: result|succeeded - -- name: Add a cron job to automatically renew LetsEncrypt certificates - copy: src=letsencrypt-renew dest=/etc/cron.daily/letsencrypt-renew mode=0700 - notify: - - restart cron - diff --git a/ubuntu/site.yml b/ubuntu/site.yml index edf8dcf..07d87a6 100644 --- a/ubuntu/site.yml +++ b/ubuntu/site.yml @@ -21,13 +21,6 @@ roles: - icinga-client -#- name: Generate LE certs on required servers -# hosts: webservers -# user: root - -# roles: -# - letsencrypt - - hosts: webservers roles: