summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2019-10-02 10:29:30 +0300
committerLars Wirzenius <liw@liw.fi>2019-10-02 10:29:30 +0300
commitebf87bfbb09f6227ce9b267f6fd593233c52ed12 (patch)
tree21b3093a3ec51fae44916be3e57ffb83dd1b9022
parent2dba50a6ddf9acb20a6006700d7e653745515ea4 (diff)
downloaddebian-ansible-ebf87bfbb09f6227ce9b267f6fd593233c52ed12.tar.gz
Fix: don't fail when apache can't be started
This happens on first run, since apache want to use a cert that hasn't been created yet.
-rw-r--r--roles/apache_server/templates/deploy_static_site_certs3
1 files changed, 2 insertions, 1 deletions
diff --git a/roles/apache_server/templates/deploy_static_site_certs b/roles/apache_server/templates/deploy_static_site_certs
index 4933d56..2306efb 100644
--- a/roles/apache_server/templates/deploy_static_site_certs
+++ b/roles/apache_server/templates/deploy_static_site_certs
@@ -32,7 +32,8 @@ run_certbot()
}
-systemctl stop apache2
+systemctl stop apache2 || true
+
for list in /etc/letsencrypt/*.list
do
certname="$(basename "$list" .list)"