From 4823353dd957aecb42443caa1f0431e09dec92d7 Mon Sep 17 00:00:00 2001 From: cwivagg Date: Sat, 24 Dec 2022 10:30:47 -0500 Subject: [PATCH] Replace shell commands with ansible --- roles/matomo/tasks/install.yml | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/roles/matomo/tasks/install.yml b/roles/matomo/tasks/install.yml index b05060e54..4edb9ce65 100644 --- a/roles/matomo/tasks/install.yml +++ b/roles/matomo/tasks/install.yml @@ -180,13 +180,6 @@ body_format: form-urlencoded status_code: 302 -- name: Set Matomo Directory Permissions - file: - path: "{{ matomo_path }}/matomo" - recurse: yes - owner: "{{ apache_user }}" # e.g. www-data - group: "{{ apache_user }}" - - name: Start Collecting Matomo Data cron: name: "MatomoDataIngestionOnReboot" @@ -204,14 +197,19 @@ user: root cron_file: "matomo_daily" +- name: Set Permissions for token.php + copy: + content: "" + dest: "{{ matomo_path }}/matomo/tmp/cache/token.php" + group: "{{ apache_user }}" + owner: "{{ apache_user }}" -- name: Start Collecting Matomo Data - cron: - name: "MatomoDataIngestionOnReboot2" - special_time: reboot - job: "sudo touch /library/www/matomo/tmp/cache/token.php && sudo mkdir /library/www/matomo/tmp/cache/tracker && sudo chown -R www-data:www-data /library/www/matomo" - user: root - cron_file: "matomo_reboot2" +- name: Set Permissions for tracker Directory + file: + path: "{{ matomo_path }}/matomo/tmp/cache/tracker" + state: directory + owner: "{{ apache_user }}" + group: "{{ apache_user }}" # RECORD Matomo AS INSTALLED