From ca107534bc0e33dbb4fb9fc3fef2a71a74e4050c Mon Sep 17 00:00:00 2001 From: rene Date: Wed, 20 Apr 2022 17:34:20 +0200 Subject: [PATCH] added migration var --- host_vars/mewitoot.de.yml | 5 ++++- roles/mastodon/tasks/system_setup/letsencrypt.yml | 6 +++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/host_vars/mewitoot.de.yml b/host_vars/mewitoot.de.yml index 69f59fa..f47f039 100644 --- a/host_vars/mewitoot.de.yml +++ b/host_vars/mewitoot.de.yml @@ -20,4 +20,7 @@ netdata: true # VPN wireguard: true -wg_local_ip: 192.168.3.11/24 \ No newline at end of file +wg_local_ip: 192.168.3.11/24 + +# Application +migration: true \ No newline at end of file diff --git a/roles/mastodon/tasks/system_setup/letsencrypt.yml b/roles/mastodon/tasks/system_setup/letsencrypt.yml index a95574e..2c495b3 100644 --- a/roles/mastodon/tasks/system_setup/letsencrypt.yml +++ b/roles/mastodon/tasks/system_setup/letsencrypt.yml @@ -15,10 +15,14 @@ - name: Reload nginx command: "systemctl reload nginx" + when: + - migration is not defined or migration == False - name: Install letsencrypt cert command: letsencrypt certonly -n --webroot -d {{ mastodon_host | default(ansible_fqdn) }} -w {{ mastodon_home }}/{{ mastodon_path }}/public/ --email "webmaster@{{ mastodon_host | default(ansible_fqdn) }}" --agree-tos && systemctl reload nginx - when: not letsencrypt_cert.stat.exists + when: + - not letsencrypt_cert.stat.exists + - migration == False or migration is not defined - name: Letsencrypt Job cron: