From af782d54117a5512ec6135068d1f8c78eb5db2f9 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Wed, 18 Dec 2019 14:50:36 +0100 Subject: minor changes to acmetool role --- roles/acmetool/base/tasks/main.yml | 2 +- roles/acmetool/base/templates/systemd-override.conf.j2 | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'roles/acmetool/base') diff --git a/roles/acmetool/base/tasks/main.yml b/roles/acmetool/base/tasks/main.yml index e46b9d9d..a5ab88d3 100644 --- a/roles/acmetool/base/tasks/main.yml +++ b/roles/acmetool/base/tasks/main.yml @@ -2,7 +2,7 @@ - name: check if acmetool package is new enough debug: msg: "Check distribution_release" - failed_when: (ansible_distribution == 'Debian' and ansible_distribution_major_version < 9) or (ansible_distribution == 'Ubuntu' and ansible_distribution_major_version < 17) or (ansible_distribution != 'Debian' and ansible_distribution != 'Ubuntu') + failed_when: (ansible_distribution == 'Debian' and (ansible_distribution_major_version | int) < 9) or (ansible_distribution == 'Ubuntu' and (ansible_distribution_major_version | int) < 17) or (ansible_distribution != 'Debian' and ansible_distribution != 'Ubuntu') - name: install needed packages apt: diff --git a/roles/acmetool/base/templates/systemd-override.conf.j2 b/roles/acmetool/base/templates/systemd-override.conf.j2 index aec6f034..dc62cb05 100644 --- a/roles/acmetool/base/templates/systemd-override.conf.j2 +++ b/roles/acmetool/base/templates/systemd-override.conf.j2 @@ -1,3 +1,12 @@ +{% if acmetool_challenge_webroot_path is defined %} +[Unit] +# In case the webroot path is hosted by a filesystem that is +# using a systemd automount unit the ReadWritePaths= below does +# prevent the unit from being loaded when the filesystem is +# not yet mounted. +RequiresMountsFor={{ acmetool_challenge_webroot_path }} +{% endif %} + [Service] {% if acmetool_http_proxy is defined %} Environment=http_proxy={{ acmetool_http_proxy }} -- cgit v1.2.3