From 45525c5397b2afb464526a09bffbe1fdc167776c Mon Sep 17 00:00:00 2001 From: cwivagg Date: Wed, 31 Aug 2022 06:42:47 -0400 Subject: [PATCH] Harden Matomo install for timezone issue Additionally, temporarily switch apache_user to www-data to unblock access to Matomo. Will debug later. --- roles/matomo/tasks/install.yml | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/roles/matomo/tasks/install.yml b/roles/matomo/tasks/install.yml index 68942ea3c..e848f7172 100644 --- a/roles/matomo/tasks/install.yml +++ b/roles/matomo/tasks/install.yml @@ -39,8 +39,8 @@ file: path: "{{ matomo_path }}/matomo" recurse: yes - owner: "{{ apache_user }}" # e.g. www-data - group: "{{ apache_user }}" + owner: www-data + group: www-data - name: HTTP Get Welcome uri: @@ -139,8 +139,22 @@ url: "{{ matomo_host_url }}" ecommerce: 0 body_format: form-urlencoded + register: _result + +- name: Fallback Configure Matomo to track IIAB + uri: + url: "{{ matomo_full_url }}index.php?action=firstWebsiteSetup&module=Installation" + method: POST + headers: + Cookie: "{{ matomo_session_cookie }}" + body: + siteName: "IIAB" + url: "{{ matomo_host_url }}" + timezone: "Europe/London" + ecommerce: 0 + body_format: form-urlencoded status_code: 302 - #register: matomo_first_website_setup + when: _result.status == 200 - name: Matomo Tracking Code uri: