From 5de6afff94a0cfea2d08d286eed95346f1321493 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Thu, 19 Mar 2020 13:32:06 +0100 Subject: [PATCH] apache: ignore errors when enabling the ssl modules. The check could fail because the configuration is not ready yet. --- library/roles/apache/tasks/apache-letsencrypt.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/library/roles/apache/tasks/apache-letsencrypt.yml b/library/roles/apache/tasks/apache-letsencrypt.yml index 7384172..4b1d662 100644 --- a/library/roles/apache/tasks/apache-letsencrypt.yml +++ b/library/roles/apache/tasks/apache-letsencrypt.yml @@ -3,16 +3,19 @@ - name: Enable the proxy modules needed by letsencrypt apache2_module: name={{ item }} state=present with_items: '{{ apache_letsencrypt_proxy_modules }}' + ignore_errors: True notify: apache2 reload - name: Install the apache letsencrypt directives on trusty template: src={{ item }}.j2 dest=/etc/apache2/conf-available/{{ item }} owner=root group=root mode=0644 with_items: '{{ apache_letsencrypt_proxy_conf }}' + ignore_errors: True notify: apache2 reload - name: Enable the apache letsencrypt directives on trusty file: src=/etc/apache2/conf-available/{{ item }} dest=/etc/apache2/conf-enabled/{{ item }} state=link with_items: '{{ apache_letsencrypt_proxy_conf }}' + ignore_errors: True notify: apache2 reload - name: Create the acme hooks directory if it does not yet exist @@ -29,6 +32,7 @@ - block: - name: Disable the letsencrypt conf file: dest=/etc/apache2/conf-enabled/letsencrypt-proxy.conf state=absent + ignore_errors: True notify: apache2 reload - name: Remove the letsencrypt hook for apache