From 9f2d80ffdb4091bcfc7dfe7902df34b7cb9956b0 Mon Sep 17 00:00:00 2001 From: Salt Date: Thu, 20 Feb 2020 05:27:49 -0600 Subject: [PATCH] Migrate dokuwiki role --- roles/dokuwiki/tasks/main.yml | 34 ++++++++++------------------------ 1 file changed, 10 insertions(+), 24 deletions(-) diff --git a/roles/dokuwiki/tasks/main.yml b/roles/dokuwiki/tasks/main.yml index 78528d8..abca1c1 100644 --- a/roles/dokuwiki/tasks/main.yml +++ b/roles/dokuwiki/tasks/main.yml @@ -39,32 +39,18 @@ path: /var/www/dokuwiki.tgz state: absent when: not stat_webroot_index.stat.exists - - name: Register certificates - block: - # Note: We copy over some insecure configs now - # Reason being there's no way for the https role to handle every site's - # configuration on its own. If it doesn't have to update the key, it - # won't reload Apache and our site will never actually see https downtime - - name: Configure insecure virtual host configs - template: - src: apache2-vhost.conf - dest: "/etc/apache2/sites-enabled/{{ dokuwiki_url }}.conf" - - name: Generate certificate - include_role: - name: https - vars: - website_url: "{{ dokuwiki_url }}" - website_webroot: "{{ dokuwiki_webroot }}" - - name: Secure Apache - block: - # If we copied over http-only configs before, they get oblooterated now - name: Copy over virtual host configs template: src: apache2-vhost-ssl.conf dest: "/etc/apache2/sites-enabled/{{ dokuwiki_url }}.conf" - - name: Reload Apache - service: - name: apache2 - state: reloaded - enabled: true + - name: Generate certificate + include_role: + name: https + vars: + website_url: "{{ dokuwiki_url }}" + website_webroot: "{{ dokuwiki_webroot }}" + - name: Reload Apache + service: + name: apache2 + state: reloaded become: yes