diff --git a/apache/defaults/main.yml b/apache/defaults/main.yml index fa01fca2..16737023 100644 --- a/apache/defaults/main.yml +++ b/apache/defaults/main.yml @@ -73,7 +73,7 @@ apache_additional_modules_list: # - # - -apache_letsencrypt_managed: False +apache_letsencrypt_managed: True apache_letsencrypt_proxy_modules: - proxy - proxy_http diff --git a/apache/tasks/apache-letsencrypt.yml b/apache/tasks/apache-letsencrypt.yml index 5765e43a..b8c9a059 100644 --- a/apache/tasks/apache-letsencrypt.yml +++ b/apache/tasks/apache-letsencrypt.yml @@ -34,6 +34,6 @@ - name: Remove the letsencrypt hook for apache file: path={{ letsencrypt_acme_services_scripts_dir }}/apache2 state=absent - when: ( letsencrypt_acme_install is defined ) and ( not letsencrypt_acme_install ) + when: not apache_letsencrypt_managed tags: [ 'apache', 'letsencrypt' ] diff --git a/apache/tasks/main.yml b/apache/tasks/main.yml index 81e218a1..a3d5e85d 100644 --- a/apache/tasks/main.yml +++ b/apache/tasks/main.yml @@ -4,6 +4,4 @@ - include: apache-basic-auth.yml when: apache_basic_auth - include: apache-letsencrypt.yml - when: - - letsencrypt_acme_install is defined and letsencrypt_acme_install - - apache_letsencrypt_managed + when: letsencrypt_acme_install is defined and letsencrypt_acme_install