From e3090a43958ba7538ba27ddb7109155f2b2ef2a7 Mon Sep 17 00:00:00 2001 From: staticsafe Date: Sun, 26 Nov 2017 18:24:45 -0500 Subject: [PATCH] Add letsencrypt-renew.sh and copy of renewal script --- roles/mastodon-nginx/files/letsencrypt-renew.sh | 4 ++++ roles/mastodon-nginx/tasks/main.yml | 5 +++++ 2 files changed, 9 insertions(+) create mode 100644 roles/mastodon-nginx/files/letsencrypt-renew.sh diff --git a/roles/mastodon-nginx/files/letsencrypt-renew.sh b/roles/mastodon-nginx/files/letsencrypt-renew.sh new file mode 100644 index 0000000..a5a0079 --- /dev/null +++ b/roles/mastodon-nginx/files/letsencrypt-renew.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash +service nginx stop +letsencrypt renew +service nginx start diff --git a/roles/mastodon-nginx/tasks/main.yml b/roles/mastodon-nginx/tasks/main.yml index 23cbcef..e28cf73 100644 --- a/roles/mastodon-nginx/tasks/main.yml +++ b/roles/mastodon-nginx/tasks/main.yml @@ -26,3 +26,8 @@ state: link - name: Start nginx service: name=nginx state=started +- name: Copy and enable Let's Encrypt renew script + copy: + src: letsencrypt-renew.sh + dest: /etc/cron.daily/letsencryt-renew.sh + mode: 0700