Files
ansible-cis/tasks/aide.yaml

25 lines
650 B
YAML

---
- name: Install AIDE
ansible.builtin.package:
name: aide
state: present
- name: Init AIDE database
ansible.builtin.shell: "aide --init {{ cis_aide_options }} && mv {{ cis_aide_new_file }} {{ cis_aide_current_file }}"
args:
creates: "{{ cis_aide_current_file }}"
async: 300
poll: 0
- name: Install AIDE crontab
ansible.builtin.copy:
dest: /etc/cron.d/aide
owner: root
group: root
mode: "0600"
content: |
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
0 5 * * * root aide --update {{ cis_aide_options }} && mv {{ cis_aide_new_file }} {{ cis_aide_current_file }}