mirror of
https://github.com/ansible-lockdown/RHEL9-CIS.git
synced 2025-12-24 14:23:05 +00:00
updates
Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com>
This commit is contained in:
parent
c6caa90059
commit
19a218390d
6 changed files with 22 additions and 21 deletions
|
|
@ -22,12 +22,16 @@
|
|||
|
||||
- name: update sysctl
|
||||
template:
|
||||
src: etc/99-sysctl.conf.j2
|
||||
dest: /etc/sysctl.d/99-sysctl.conf
|
||||
src: "etc/sysctl.d/{{ item }}.j2"
|
||||
dest: "/etc/sysctl.d/{{ item }}"
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0600
|
||||
notify: reload sysctl
|
||||
with_items:
|
||||
- 60-kernel_sysctl.conf
|
||||
- 60-disable_ipv6.conf
|
||||
- 99-sysctl.conf
|
||||
when:
|
||||
- ansible_virtualization_type != "docker"
|
||||
- "'procps-ng' in ansible_facts.packages"
|
||||
|
|
|
|||
|
|
@ -32,13 +32,10 @@
|
|||
- rule_1.5.2
|
||||
|
||||
- name: "1.5.3 | PATCH | Ensure address space layout randomization (ASLR) is enabled"
|
||||
sysctl:
|
||||
name: kernel.randomize_va_space
|
||||
value: '2'
|
||||
state: present
|
||||
reload: yes
|
||||
sysctl_set: yes
|
||||
ignoreerrors: yes
|
||||
debug:
|
||||
msg: "Control being set via Handler 'update sysctl' which writes to /etc/sysctl.d/99-sysctl.conf"
|
||||
notify:
|
||||
- update sysctl
|
||||
when:
|
||||
- rhel9cis_rule_1_5_3
|
||||
tags:
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# Run AIDE integrity check
|
||||
# added via ansible-lockdown remediation
|
||||
# CIS 1.4.2
|
||||
# CIS 1.3.2
|
||||
|
||||
{{ rhel9cis_aide_cron['aide_minute'] }} {{ rhel9cis_aide_cron['aide_hour'] }} {{ rhel9cis_aide_cron['aide_month'] }} {{ rhel9cis_aide_cron['aide_weekday'] }} {{ rhel9cis_aide_cron['aide_job'] }}
|
||||
|
|
@ -1,3 +1,6 @@
|
|||
# Setting added via ansible CIS remediation playbook
|
||||
|
||||
# IPv6 disable
|
||||
{% if rhel9cis_rule_3_1_1 and rhel9cis_ipv6_required %}
|
||||
net.ipv6.conf.all.disable_ipv6 = 1
|
||||
net.ipv6.conf.default.disable_ipv6 = 1
|
||||
8
templates/etc/sysctl.d/60-kernel_sysctl.conf.j2
Normal file
8
templates/etc/sysctl.d/60-kernel_sysctl.conf.j2
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
# Setting added via ansible CIS remediation playbook
|
||||
|
||||
|
||||
{% if rhel9cis_rule_1_5_3 %}
|
||||
# Kernel sysctl
|
||||
# CIS 1.5.3
|
||||
kernel.randomize_va_space = 2
|
||||
{% endif %}
|
||||
|
|
@ -1,16 +1,5 @@
|
|||
# Setting added via ansible CIS remediation playbook
|
||||
|
||||
{% if rhel9cis_rule_1_6_1 %}
|
||||
# Filesystem sysctl
|
||||
# CIS 1.6.1
|
||||
fs.suid_dumpable = 0
|
||||
{% endif %}
|
||||
{% if rhel9cis_rule_1_6_2 %}
|
||||
# Kernel sysctl
|
||||
# CIS 1.6.2
|
||||
kernel.randomize_va_space = 2
|
||||
{% endif %}
|
||||
|
||||
# Network sysctl
|
||||
{% if rhel9cis_rule_3_2_1 %}
|
||||
# CIS 3.2.1
|
||||
Loading…
Add table
Add a link
Reference in a new issue