From 10141cd7926cf3eda33039c12bac09a15f4ae4ad Mon Sep 17 00:00:00 2001 From: Marko Zivanovic Date: Sun, 26 Jul 2026 23:58:15 +0200 Subject: [PATCH] - Add a separate variable that controls uploading existing AIDE database from the controller node during the check phase. - Fetch AIDE logs from the latest run to the controller node. --- defaults/main.yml | 3 +++ tasks/main.yml | 10 +++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/defaults/main.yml b/defaults/main.yml index 1729119..8af69a3 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -15,6 +15,9 @@ aide_init: false # Fetch db aide_fetch_db: false +# Upload db +aide_upload_db: false + # Enable check database phase aide_check: false diff --git a/tasks/main.yml b/tasks/main.yml index 3d4bb7e..cc539bb 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -103,7 +103,7 @@ owner: root group: root mode: "0440" - when: aide_fetch_db | bool + when: aide_upload_db | bool - name: Check against AIDE reference database ansible.builtin.command: @@ -153,6 +153,14 @@ - aide_cron_check is not none - not aide_cron_check | bool + - name: Fetch AIDE logs + ansible.builtin.fetch: + src: "/var/log/aide/aide.log" + dest: "{{ aide_db_fetch_dir }}" + owner: root + group: root + mode: "0640" + - name: Record role success fingerprint sr_fingerprint: sr_message: >-