Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(feature) Add exclude paths to AIDE (task 1.4.2) #43

Merged
merged 1 commit into from
Mar 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions files/1.4.1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
!/backup*
!/dev/disk/
!/etc/.etckeeper
!/etc/.git/
!/etc/aide/.aide.conf.swp
!/etc/aide/.aide.conf.swp
!/etc/aide/aide.conf.d/00_local_excludes
!/etc/ld.so.cache
!/etc/lvm/archive
!/etc/lvm/backup
!/media/*
!/root/.*
!/run
!/var/backups/
!/var/cache/
!/var/lib/apt/daily_lock
!/var/lib/apt/periodic/unattended-upgrades-stamp
!/var/lib/apt/periodic/upgrade-stamp
!/var/lib/clamav/
!/var/lib/dpkg/triggers/Lock
!/var/lib/fail2ban/fail2ban.sqlite3
!/var/lib/logrotate
!/var/lib/monit/state
!/var/lib/systemd/timers/stamp-apt-daily-upgrade.timer
!/var/lib/systemd/timers/stamp-apt-daily.timer
!/var/lib/vnstat/*
!/var/log.*
!/var/spool/.*
!/var/lib/docker/
14 changes: 12 additions & 2 deletions tasks/section_1_Initial_Setup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,7 @@
when: disable_udf
tags:
- section1
- level_1_server
- level_1_workstation
- level_1_server - level_1_workstation
- 1.1.1.6
- filesystems
- udf
Expand Down Expand Up @@ -551,6 +550,17 @@
name: ["nullmailer", "aide-common", "aide"]
state: present
install_recommends: false
- name: Configure default AIDE excludes file
copy:
src: "files/1.4.1.txt"
dest: "/etc/aide/aide.conf.d/00_local_excludes"
- name: Add extra AIDE exclude paths
lineinfile:
line: "{{ item }}"
path: "/etc/aide/aide.conf.d/00_local_excludes"
state: present
loop: "{{ aide_exclude_paths }}"
when: (aide_exclude_paths is defined) and (aide_exclude_paths| length > 0)
- name: Configure AIDE as appropriate for your environment | aideinit
command: aideinit
- name: Configure AIDE as appropriate for your environment | aideinit db
Expand Down