From bd30d7dfaf25200900d9ebacfaf62e8bcfd7ac65 Mon Sep 17 00:00:00 2001 From: Thedro Neely Date: Sat, 18 Jan 2020 21:43:20 -0500 Subject: roles/nginx/main: Add certbot --- roles/nginx/main.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) 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' + + -- cgit v1.2.3