4
0
Fork 0
Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com>
This commit is contained in:
Mark Bolwell 2022-03-30 16:34:33 +01:00
parent c6caa90059
commit 19a218390d
No known key found for this signature in database
GPG key ID: F734FDFC154B83FB
6 changed files with 22 additions and 21 deletions

View file

@ -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"

View file

@ -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:

View file

@ -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'] }}

View file

@ -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

View 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 %}

View file

@ -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