From 0e58f34e18efcb960ca287920a27f54d693b45f2 Mon Sep 17 00:00:00 2001 From: Ludovic Poujol Date: Tue, 26 Nov 2019 11:58:52 +0100 Subject: [PATCH] certbot: Properly evaluate when apache is installed Checking the existence of /etc/apache2 is not enough as a condition to validate the presence of apache. Indeed, some packages (including certbot!!!), put some files in /etc/apache2/conf-available even if apache isn't installed. In those cases, the check is not correct, and we'll enter in the apache block, and fail when we try to enable the configuration. With this commit, we now validate the presence apache with the presence of /usr/sbin/apachectl --- CHANGELOG.md | 1 + certbot/tasks/acme-challenge.yml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dcacf270..9e1a9b91 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -63,6 +63,7 @@ The **patch** part changes incrementally at each release. * roundcube: fix typo for roundcube vhost * tomcat: fix typo for default tomcat_version * evolinux-base: Fix our zsyslog rotate config that doesn't work on Debian 10 +* certbot: Properly evaluate when apache is installed ### Security diff --git a/certbot/tasks/acme-challenge.yml b/certbot/tasks/acme-challenge.yml index d2fa78ec..d5fe803d 100644 --- a/certbot/tasks/acme-challenge.yml +++ b/certbot/tasks/acme-challenge.yml @@ -21,7 +21,7 @@ - name: Check if Apache is installed stat: - path: /etc/apache2 + path: /usr/sbin/apachectl register: is_apache - block: