From e6c8aa3cee57efa603d70d3bc6b36b239020cd36 Mon Sep 17 00:00:00 2001 From: "flyingscorpio@clevo" Date: Tue, 15 Mar 2022 15:31:12 +0100 Subject: [PATCH] Move module enabling to certbot role --- roles/2px-apache2/tasks/main.yml | 8 ++------ roles/certbot/tasks/main.yml | 12 +++++++++++- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/roles/2px-apache2/tasks/main.yml b/roles/2px-apache2/tasks/main.yml index 5a1efa3..80d5373 100644 --- a/roles/2px-apache2/tasks/main.yml +++ b/roles/2px-apache2/tasks/main.yml @@ -16,15 +16,11 @@ update_cache: yes notify: Reload apache2 service -- name: Activate modules +- name: Enable wsgi module become: true apache2_module: - name: "{{ item }}" + name: wsgi state: present - with_items: - - rewrite - - ssl - - wsgi notify: Reload apache2 service - name: Copy vHost conf diff --git a/roles/certbot/tasks/main.yml b/roles/certbot/tasks/main.yml index 7e00b0f..3212a4a 100644 --- a/roles/certbot/tasks/main.yml +++ b/roles/certbot/tasks/main.yml @@ -19,7 +19,17 @@ src: acme.conf dest: /etc/apache2/conf-available/acme.conf -- name: Activate acme apache conf +- name: Enable modules + become: true + apache2_module: + name: "{{ item }}" + state: present + with_items: + - rewrite + - ssl + notify: Reload apache2 service + +- name: Enable acme apache conf become: true command: a2enconf acme register: result