Make possible to avoid aide installation

This patch adds variable `security_rhel7_enable_aide`. When it's False,
all AIDE related tasks would be ommited.

Change-Id: I64af348d9f49922ab51d8cd348d987df4263faa1
This commit is contained in:
Dmitriy Rabotyagov 2021-01-26 17:32:39 +02:00
parent c6703cd5e5
commit 180fc448eb
8 changed files with 30 additions and 5 deletions

View File

@ -69,6 +69,7 @@ security_set_maximum_password_lifetime: no # V-71931
## AIDE (aide) ## AIDE (aide)
# Initialize the AIDE database immediately (may take time). # Initialize the AIDE database immediately (may take time).
security_rhel7_initialize_aide: no # V-71973 security_rhel7_initialize_aide: no # V-71973
security_rhel7_enable_aide: yes
# The default Ubuntu configuration for AIDE will cause it to wander into some # The default Ubuntu configuration for AIDE will cause it to wander into some
# terrible places on the system, such as /var/lib/lxc and images in /opt. # terrible places on the system, such as /var/lib/lxc and images in /opt.

View File

@ -31,4 +31,10 @@ re-apply the role:
a long time on some systems. During this time, the CPU and disks are **very a long time on some systems. During this time, the CPU and disks are **very
busy**. busy**.
To avoid installing and initializing AIDE, set the following Ansible variable:
.. code-block:: yaml
security_rhel7_enable_aide: false
.. include:: auto_aide.rst .. include:: auto_aide.rst

View File

@ -0,0 +1,5 @@
---
features:
- |
Added variable ``security_rhel7_enable_aide`` that is designed to avoid
installation and initialization of the aide related STIGs

View File

@ -81,6 +81,7 @@
# Controls by Tag" section of the role documentation. # Controls by Tag" section of the role documentation.
- import_tasks: accounts.yml - import_tasks: accounts.yml
- import_tasks: aide.yml - import_tasks: aide.yml
when: security_rhel7_enable_aide | bool
- import_tasks: auditd.yml - import_tasks: auditd.yml
- import_tasks: auth.yml - import_tasks: auth.yml
- import_tasks: file_perms.yml - import_tasks: file_perms.yml

View File

@ -55,14 +55,17 @@ stig_packages_rhel7:
- packages: - packages:
- auditd - auditd
- audispd-plugins - audispd-plugins
- aide
- aide-common
- libpwquality-common - libpwquality-common
- openssh-client - openssh-client
- openssh-server - openssh-server
- screen - screen
state: "{{ security_package_state }}" state: "{{ security_package_state }}"
enabled: True enabled: True
- packages:
- aide
- aide-common
state: "{{ security_package_state }}"
enabled: "{{ security_rhel7_enable_aide }}"
- packages: - packages:
- apparmor - apparmor
- apparmor-profiles - apparmor-profiles

View File

@ -52,7 +52,6 @@ stig_packages_rhel7:
- packages: - packages:
- audispd-plugins - audispd-plugins
- audit - audit
- aide
- dracut-fips - dracut-fips
- dracut-fips-aesni - dracut-fips-aesni
- openssh-clients - openssh-clients
@ -60,6 +59,10 @@ stig_packages_rhel7:
- screen - screen
state: "{{ security_package_state }}" state: "{{ security_package_state }}"
enabled: True enabled: True
- packages:
- aide
state: "{{ security_package_state }}"
enabled: "{{ security_rhel7_enable_aide }}"
- packages: - packages:
- libselinux-python - libselinux-python
- policycoreutils-python - policycoreutils-python

View File

@ -52,13 +52,16 @@ stig_packages_rhel7:
- packages: - packages:
- audispd-plugins - audispd-plugins
- audit - audit
- aide
- dracut-fips - dracut-fips
- dracut-fips-aesni - dracut-fips-aesni
- openssh-clients - openssh-clients
- openssh-server - openssh-server
state: "{{ security_package_state }}" state: "{{ security_package_state }}"
enabled: True enabled: True
- packages:
- aide
state: "{{ security_package_state }}"
enabled: "{{ security_rhel7_enable_aide }}"
- packages: - packages:
- python3-libselinux - python3-libselinux
- policycoreutils-python-utils - policycoreutils-python-utils

View File

@ -54,12 +54,15 @@ stig_packages_rhel7:
- packages: - packages:
- audit-audispd-plugins - audit-audispd-plugins
- audit - audit
- aide
- dracut-fips - dracut-fips
- openssh - openssh
- screen - screen
state: "{{ security_package_state }}" state: "{{ security_package_state }}"
enabled: True enabled: True
- packages:
- aide
state: "{{ security_package_state }}"
enabled: "{{ security_rhel7_enable_aide }}"
- packages: - packages:
- apparmor-parser - apparmor-parser
- apparmor-profiles - apparmor-profiles