72 lines
2.1 KiB
YAML
72 lines
2.1 KiB
YAML
---
|
|
|
|
- name: "6.2.2.1 | PATCH | Ensure audit log storage size is configured"
|
|
when: ubtu24cis_rule_6_2_2_1
|
|
tags:
|
|
- level2-server
|
|
- level2-workstation
|
|
- patch
|
|
- rule_6.2.2.1
|
|
- NIST800-53R5_AU-8
|
|
- auditd
|
|
ansible.builtin.lineinfile:
|
|
dest: /etc/audit/auditd.conf
|
|
regexp: "^max_log_file( |=)"
|
|
line: "max_log_file = {{ ubtu24cis_max_log_file_size }}"
|
|
state: present
|
|
notify: Restart auditd
|
|
|
|
- name: "6.2.2.2 | PATCH | Ensure audit logs are not automatically deleted"
|
|
when: ubtu24cis_rule_6_2_2_2
|
|
tags:
|
|
- level2-server
|
|
- level2-workstation
|
|
- patch
|
|
- rule_6.2.2.2
|
|
- NIST800-53R5_AU-8
|
|
- auditd
|
|
ansible.builtin.lineinfile:
|
|
path: /etc/audit/auditd.conf
|
|
regexp: '^max_log_file_action'
|
|
line: "max_log_file_action = {{ ubtu24cis_auditd_max_log_file_action }}"
|
|
notify: Restart auditd
|
|
|
|
- name: "6.2.2.3 | PATCH | Ensure system is disabled when audit logs are full"
|
|
when: ubtu24cis_rule_6_2_2_3
|
|
tags:
|
|
- level2-server
|
|
- level2-workstation
|
|
- patch
|
|
- rule_6.2.2.3
|
|
- NIST800-53R5_AU-8
|
|
- auditd
|
|
ansible.builtin.lineinfile:
|
|
path: /etc/audit/auditd.conf
|
|
regexp: "{{ item.regexp }}"
|
|
line: "{{ item.line }}"
|
|
with_items:
|
|
- { regexp: '^disk_full_action', line: "disk_full_action = {{ ubtu24cis_auditd_disk_full_action }}" }
|
|
- { regexp: '^disk_error_action', line: "disk_error_action = {{ ubtu24cis_auditd_disk_error_action }}" }
|
|
notify: Restart auditd
|
|
|
|
- name: "6.2.2.4 | PATCH | Ensure system warns when audit logs are low on space"
|
|
when: ubtu24cis_rule_6_2_2_4
|
|
tags:
|
|
- level2-server
|
|
- level2-workstation
|
|
- patch
|
|
- auditd
|
|
- rule_6.2.2.4
|
|
- NIST800-53R5_AU-2
|
|
- NIST800-53R5_AU-3
|
|
- NIST800-53R5_AU-12
|
|
- NIST800-53R5_SI-5
|
|
ansible.builtin.lineinfile:
|
|
path: /etc/audit/auditd.conf
|
|
regexp: "{{ item.regexp }}"
|
|
line: "{{ item.line }}"
|
|
loop:
|
|
- { regexp: '^admin_space_left_action', line: 'admin_space_left_action = {{ ubtu24cis_auditd_admin_space_left_action }}' }
|
|
- { regexp: '^space_left_action', line: 'space_left_action = {{ ubtu24cis_auditd_space_left_action }}' }
|
|
notify: Restart auditd
|