feat: Allow setup aide inside of cron job

Signed-off-by: Radovan Sroka <rsroka@redhat.com>
This commit is contained in:
Radovan Sroka
2025-01-07 13:06:03 +01:00
committed by Sergei Petrosian
parent cdfdd3523d
commit 49e267a29b
5 changed files with 77 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
# SPDX-License-Identifier: MIT
---
- name: Ensure that the cron is set up
hosts: all
gather_facts: false # test that role works in this case
roles:
- role: linux-system-roles.aide
vars:
aide_init: true
aide_cron_check: true
aide_cron_interval: "0 12 * * *"
tasks:
- name: Check file content
ansible.builtin.lineinfile:
path: /etc/crontab
regexp: "^0 12 \\* \\* \\* root /usr/bin/aide --check"
state: absent
check_mode: true
changed_when: false
vars:
__fingerprint: system_role:aide