mirror of
https://github.com/ansible-lockdown/RHEL9-CIS.git
synced 2025-12-24 22:23:06 +00:00
renamed variables
Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com>
This commit is contained in:
parent
c58c4eb4e8
commit
14d038e8eb
14 changed files with 113 additions and 113 deletions
|
|
@ -27,8 +27,8 @@
|
|||
ansible.builtin.file:
|
||||
path: "{{ item }}"
|
||||
mode: 'u-x,g-wx,o-rwx'
|
||||
failed_when: rhel9cis_logfile_list.state not in '[ file, absent ]'
|
||||
register: rhel9cis_logfile_list
|
||||
failed_when: discovered_logfile_list.state not in '[ file, absent ]'
|
||||
register: discovered_logfile_list
|
||||
loop: "{{ discovered_logfiles.stdout_lines }}"
|
||||
|
||||
- name: "6.2.4.1 | PATCH | Ensure access to all logfiles has been configured | change permissions"
|
||||
|
|
@ -38,8 +38,8 @@
|
|||
ansible.builtin.file:
|
||||
path: "{{ item }}"
|
||||
mode: 'u-x,g-x,o-rwx'
|
||||
failed_when: rhel9cis_logfile_list.state not in '[ file, absent ]'
|
||||
register: rhel9cis_logfile_list
|
||||
failed_when: discovered_logfile_list.state not in '[ file, absent ]'
|
||||
register: discovered_logfile_list
|
||||
loop: "{{ discovered_logfiles.stdout_lines }}"
|
||||
|
||||
- name: "6.2.4.1 | PATCH | Ensure access to all logfiles has been configured | change permissions"
|
||||
|
|
@ -53,6 +53,6 @@
|
|||
ansible.builtin.file:
|
||||
path: "{{ item }}"
|
||||
mode: 'ug-x,o-wx'
|
||||
failed_when: rhel9cis_logfile_list.state not in '[ file, absent ]'
|
||||
register: rhel9cis_logfile_list
|
||||
failed_when: discovered_logfile_list.state not in '[ file, absent ]'
|
||||
register: discovered_logfile_list
|
||||
loop: "{{ discovered_logfiles.stdout_lines }}"
|
||||
|
|
|
|||
|
|
@ -42,13 +42,13 @@
|
|||
changed_when: false
|
||||
failed_when: false
|
||||
check_mode: false
|
||||
register: rhel9cis_6_3_1_2_grubby_curr_value_audit_linux
|
||||
register: discovered_grubby_curr_value_audit_linux
|
||||
|
||||
- name: "6.3.1.2 | PATCH | Ensure auditing for processes that start prior to auditd is enabled | Grubby update, if needed"
|
||||
when:
|
||||
- rhel9cis_6_3_1_2_grubby_curr_value_audit_linux.stdout == '' or
|
||||
'0' in rhel9cis_6_3_1_2_grubby_curr_value_audit_linux.stdout or
|
||||
'off' in rhel9cis_6_3_1_2_grubby_curr_value_audit_linux.stdout|lower
|
||||
- discovered_grubby_curr_value_audit_linux.stdout == '' or
|
||||
'0' in discovered_grubby_curr_value_audit_linux.stdout or
|
||||
'off' in discovered_grubby_curr_value_audit_linux.stdout|lower
|
||||
ansible.builtin.shell: grubby --update-kernel=ALL --args="audit=1"
|
||||
|
||||
- name: "6.3.1.3 | PATCH | Ensure audit_backlog_limit is sufficient"
|
||||
|
|
@ -71,25 +71,25 @@
|
|||
changed_when: false
|
||||
failed_when: false
|
||||
check_mode: false
|
||||
register: rhel9cis_6_3_1_3_grubby_curr_value_backlog_linux
|
||||
register: discovered_grubby_curr_value_backlog_linux
|
||||
|
||||
- name: "6.3.1.3 | AUDIT | Check to see if limits are set"
|
||||
when:
|
||||
- rhel9cis_6_3_1_3_grubby_curr_value_backlog_linux is not defined or
|
||||
rhel9cis_6_3_1_3_grubby_curr_value_backlog_linux.stdout_lines == []
|
||||
- discovered_grubby_curr_value_backlog_linux is not defined or
|
||||
discovered_grubby_curr_value_backlog_linux.stdout_lines == []
|
||||
ansible.builtin.set_fact:
|
||||
rhel9cis_6_3_1_3_reset_backlog_limits: true
|
||||
discovered_reset_backlog_limits: true
|
||||
|
||||
- name: "6.3.1.3 | AUDIT | Check to see if any limits are too low"
|
||||
when:
|
||||
- (item | int < rhel9cis_audit_back_log_limit)
|
||||
ansible.builtin.set_fact:
|
||||
rhel9cis_6_3_1_3_reset_backlog_limits: true
|
||||
loop: "{{ rhel9cis_6_3_1_3_grubby_curr_value_backlog_linux.stdout_lines }}"
|
||||
discovered_reset_backlog_limits: true
|
||||
loop: "{{ discovered_grubby_curr_value_backlog_linux.stdout_lines }}"
|
||||
|
||||
- name: "6.3.1.3 | AUDIT | Ensure audit_backlog_limit is sufficient | Grubby update applied"
|
||||
when:
|
||||
- rhel9cis_6_3_1_3_reset_backlog_limits is defined
|
||||
- discovered_reset_backlog_limits is defined
|
||||
ansible.builtin.shell:
|
||||
cmd: 'grubby --update-kernel=ALL --args="audit_backlog_limit={{ rhel9cis_audit_back_log_limit }}"'
|
||||
|
||||
|
|
|
|||
|
|
@ -50,8 +50,8 @@
|
|||
ansible.builtin.file:
|
||||
path: "{{ item.path }}"
|
||||
mode: 'u-x,g-wx,o-rwx'
|
||||
failed_when: rhel9cis_6_3_4_5_file_list.state not in '[ file, absent ]'
|
||||
register: rhel9cis_6_3_4_5_file_list
|
||||
failed_when: discovered_audit_conf_file_list.state not in '[ file, absent ]'
|
||||
register: discovered_audit_conf_file_list
|
||||
loop: "{{ prelim_auditd_conf_files.files }}"
|
||||
loop_control:
|
||||
label: "{{ item.path }}"
|
||||
|
|
@ -68,8 +68,8 @@
|
|||
ansible.builtin.file:
|
||||
path: "{{ item.path }}"
|
||||
owner: root
|
||||
failed_when: rhel9cis_6_3_4_6_file_list.state not in '[ file, absent ]'
|
||||
register: rhel9cis_6_3_4_6_file_list
|
||||
failed_when: discovered_audit_conf_file_list.state not in '[ file, absent ]'
|
||||
register: discovered_audit_conf_file_list
|
||||
loop: "{{ prelim_auditd_conf_files.files | default([]) }}"
|
||||
loop_control:
|
||||
label: "{{ item.path }}"
|
||||
|
|
@ -86,8 +86,8 @@
|
|||
ansible.builtin.file:
|
||||
path: "{{ item.path }}"
|
||||
group: root
|
||||
failed_when: rhel9cis_6_3_4_7_file_list.state not in '[ file, absent ]'
|
||||
register: rhel9cis_6_3_4_7_file_list
|
||||
failed_when: discovered_audit_conf_file_list.state not in '[ file, absent ]'
|
||||
register: discovered_audit_conf_file_list
|
||||
loop: "{{ prelim_auditd_conf_files.files | default([]) }}"
|
||||
loop_control:
|
||||
label: "{{ item.path }}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue