diff --git a/roles/matomo/tasks/install.yml b/roles/matomo/tasks/install.yml index 1fa5ab147..5d8240905 100644 --- a/roles/matomo/tasks/install.yml +++ b/roles/matomo/tasks/install.yml @@ -21,12 +21,11 @@ - name: Download and Extract Matomo unarchive: src: https://builds.matomo.org/matomo.zip - dest: /var/www/html + dest: "{{ nginx_loc }}" remote_src: yes - creates: "{{ matomo_nginx_loc }}" - name: Set Matomo Directory Permissions file: - path: "{{ matomo_nginx_loc }}" + path: "{{ nginx_loc }}/matomo" recurse: yes owner: www-data group: www-data @@ -97,7 +96,7 @@ Cookie: "{{ matomo_session_cookie }}" body: name: "IIAB" - url: "host_url" + url: "{{ host_url }}" timezone: "Europe/London" ecommerce: 0 body_format: form-urlencoded @@ -105,7 +104,7 @@ register: matomo_first_website_setup - name: Matomo Tracking Code uri: - url: "{{ matomo_url }}index.php?action=trackingCode&module=Installation&site_idSite=1&site_name=http://10.0.0.72" + url: "{{ matomo_url }}index.php?action=trackingCode&module=Installation&site_idSite=1&site_name={{ host_url }}" method: GET headers: Cookie: "{{ matomo_session_cookie }}" diff --git a/roles/matomo/tasks/main.yml b/roles/matomo/tasks/main.yml index b926afc3f..799b171cf 100644 --- a/roles/matomo/tasks/main.yml +++ b/roles/matomo/tasks/main.yml @@ -2,7 +2,7 @@ include_tasks: install.yml when: matomo_installed is undefined vars: - matomo_nginx_loc: "/library/www/html/matomo" + nginx_loc: "/library/www/html" mdb_dbname: "matomodb" mdb_username: "iiab-admin" mdb_password: "g0adm1n"