summaryrefslogtreecommitdiff
path: root/roles/nginx
diff options
context:
space:
mode:
authorThedro Neely <thedroneely@gmail.com>2020-01-18 21:43:20 -0500
committerThedro Neely <thedroneely@gmail.com>2020-01-18 21:43:20 -0500
commitbd30d7dfaf25200900d9ebacfaf62e8bcfd7ac65 (patch)
tree4a1e2ba3a89507b097dbdb100a92b203ef35fe3e /roles/nginx
parent3a01f3387ed41b74f1982dd1d155136bb44bdb49 (diff)
downloadplaybooks-bd30d7dfaf25200900d9ebacfaf62e8bcfd7ac65.tar.gz
playbooks-bd30d7dfaf25200900d9ebacfaf62e8bcfd7ac65.tar.bz2
playbooks-bd30d7dfaf25200900d9ebacfaf62e8bcfd7ac65.zip
roles/nginx/main: Add certbot
Diffstat (limited to 'roles/nginx')
-rw-r--r--roles/nginx/main.yml17
1 files changed, 17 insertions, 0 deletions
diff --git a/roles/nginx/main.yml b/roles/nginx/main.yml
index f9366fa..d0a3b98 100644
--- a/roles/nginx/main.yml
+++ b/roles/nginx/main.yml
@@ -33,6 +33,8 @@
update_cache: yes
name:
- logrotate
+ - certbot
+ - certbot-nginx
- name: Installing the required nginx dependencies
apk:
@@ -266,3 +268,18 @@
enabled: yes
with_items:
- nginx
+
+ - name: Setting up certbot automatic renewal
+ blockinfile:
+ path: /etc/periodic/daily/certbot
+ block: |
+ #!/bin/sh
+ /usr/bin/certbot renew --agree-tos
+ create: yes
+
+ - name: Making certbot executable
+ file:
+ path: /etc/periodic/daily/certbot
+ mode: '0755'
+
+