From 999a959987d02504c138597640e16df7dc8d91f2 Mon Sep 17 00:00:00 2001 From: Matthew Somerville Date: Thu, 22 Nov 2018 13:44:36 +0000 Subject: [PATCH] Make sure LE config is correct for renewals. --- roles/mastodon-nginx/files/cli.ini | 2 ++ roles/mastodon-nginx/tasks/main.yml | 8 ++++++++ 2 files changed, 10 insertions(+) create mode 100644 roles/mastodon-nginx/files/cli.ini diff --git a/roles/mastodon-nginx/files/cli.ini b/roles/mastodon-nginx/files/cli.ini new file mode 100644 index 0000000..9b0f698 --- /dev/null +++ b/roles/mastodon-nginx/files/cli.ini @@ -0,0 +1,2 @@ +authenticator = webroot +webroot-path = /home/mastodon/live/public/ diff --git a/roles/mastodon-nginx/tasks/main.yml b/roles/mastodon-nginx/tasks/main.yml index 6c04332..17643d6 100644 --- a/roles/mastodon-nginx/tasks/main.yml +++ b/roles/mastodon-nginx/tasks/main.yml @@ -24,6 +24,14 @@ src: letsencrypt-renew.sh dest: /etc/cron.daily/letsencrypt-renew.sh mode: 0700 +- name: Make Let's Encrypt configuration directory + file: + dest: /root/.config/letsencrypt + state: directory +- name: Copy Let's Encrypt configuration file + copy: + src: cli.ini + dest: /root/.config/letsencrypt/cli.ini - name: Run nginx install tasks include_tasks: install.yml when: install is defined