mirror of
https://github.com/nikdoof/ansible-cis.git
synced 2025-12-17 03:49:23 +00:00
Support AIDE config on Debian
This commit is contained in:
@@ -3,3 +3,7 @@ cis_hide_proc: false
|
|||||||
|
|
||||||
cis_cron_service_name: crond
|
cis_cron_service_name: crond
|
||||||
cis_auditd_package: auditd
|
cis_auditd_package: auditd
|
||||||
|
|
||||||
|
cis_aide_options:
|
||||||
|
cis_aide_new_file: /var/lib/aide/aide.db.new.gz
|
||||||
|
cis_aide_current_file: /var/lib/aide/aide.db.gz
|
||||||
|
|||||||
@@ -3,12 +3,6 @@
|
|||||||
ansible.builtin.service:
|
ansible.builtin.service:
|
||||||
name: sshd
|
name: sshd
|
||||||
state: restarted
|
state: restarted
|
||||||
- name: init aide
|
|
||||||
ansible.builtin.shell: aide --init; mv /var/lib/aide/aide.db.new.gz /var/lib/aide/aide.db.gz
|
|
||||||
args:
|
|
||||||
creates: /var/lib/aide/aide.db.gz
|
|
||||||
async: 300
|
|
||||||
poll: 0
|
|
||||||
- name: remount proc
|
- name: remount proc
|
||||||
ansible.posix.mount:
|
ansible.posix.mount:
|
||||||
path: /proc
|
path: /proc
|
||||||
|
|||||||
@@ -3,7 +3,14 @@
|
|||||||
ansible.builtin.package:
|
ansible.builtin.package:
|
||||||
name: aide
|
name: aide
|
||||||
state: present
|
state: present
|
||||||
notify: init aide
|
|
||||||
|
- 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
|
- name: Install AIDE crontab
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
dest: /etc/cron.d/aide
|
dest: /etc/cron.d/aide
|
||||||
@@ -14,4 +21,4 @@
|
|||||||
SHELL=/bin/bash
|
SHELL=/bin/bash
|
||||||
PATH=/sbin:/bin:/usr/sbin:/usr/bin
|
PATH=/sbin:/bin:/usr/sbin:/usr/bin
|
||||||
MAILTO=root
|
MAILTO=root
|
||||||
0 5 * * * root aide --update; mv /var/lib/aide/aide.db.new.gz /var/lib/aide/aide.db.gz
|
0 5 * * * root aide --update {{ cis_aide_options }} && mv {{ cis_aide_new_file }} {{ cis_aide_current_file }}
|
||||||
|
|||||||
@@ -1,2 +1,6 @@
|
|||||||
---
|
---
|
||||||
cis_cron_service_name: cron
|
cis_cron_service_name: cron
|
||||||
|
|
||||||
|
cis_aide_options: --config /etc/aide/aide.conf
|
||||||
|
cis_aide_new_file: /var/lib/aide/aide.db.new
|
||||||
|
cis_aide_current_file: /var/lib/aide/aide.db
|
||||||
|
|||||||
Reference in New Issue
Block a user