forked from ansible-lockdown/RHEL9-CIS
tidy up vars
Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com>
This commit is contained in:
parent
2565df6047
commit
2d21f8a98e
10 changed files with 45 additions and 99 deletions
|
|
@ -1,51 +1,55 @@
|
|||
---
|
||||
|
||||
- name: "3.2.1 | PATCH | Ensure source routed packets are not accepted"
|
||||
- name: "3.2.1 | PATCH | Ensure IP forwarding is disabled"
|
||||
block:
|
||||
- name: "3.2.1 | PATCH | Ensure source routed packets are not accepted"
|
||||
debug:
|
||||
msg: "Control being set via Handler 'update sysctl' which writes to /etc/sysctl.d/99-sysctl.conf"
|
||||
notify:
|
||||
- update sysctl
|
||||
- sysctl flush ipv4 route table
|
||||
- name: "3.2.1 | PATCH | Ensure IP forwarding is disabled | Disable IPv4 forwarding"
|
||||
sysctl:
|
||||
name: net.ipv4.ip_forward
|
||||
value: '0'
|
||||
state: present
|
||||
reload: yes
|
||||
ignoreerrors: yes
|
||||
notify: sysctl flush ipv4 route table
|
||||
|
||||
- name: "3.2.1 | PATCH | Ensure source routed packets are not accepted"
|
||||
debug:
|
||||
msg: "Control being set via Handler 'update sysctl' which writes to /etc/sysctl.d/99-sysctl.conf"
|
||||
notify:
|
||||
- sysctl flush ipv6 route table
|
||||
- update sysctl
|
||||
- name: "3.2.1 | PATCH | Ensure IP forwarding is disabled | Disable IPv6 forwarding"
|
||||
sysctl:
|
||||
name: net.ipv6.conf.all.forwarding
|
||||
value: '0'
|
||||
state: present
|
||||
reload: yes
|
||||
ignoreerrors: yes
|
||||
notify: sysctl flush ipv6 route table
|
||||
when: rhel9cis_ipv6_required
|
||||
when:
|
||||
- not rhel9cis_is_router
|
||||
- rhel9cis_rule_3_2_1
|
||||
tags:
|
||||
- level1-server
|
||||
- level1-workstation
|
||||
- automated
|
||||
- sysctl
|
||||
- patch
|
||||
- rule_3.2.1
|
||||
|
||||
- name: "3.2.2 | PATCH | Ensure ICMP redirects are not accepted"
|
||||
block:
|
||||
- name: "3.2.2 | PATCH | Ensure ICMP redirects are not accepted"
|
||||
debug:
|
||||
msg: "Control being set via Handler 'update sysctl' which writes to /etc/sysctl.d/99-sysctl.conf"
|
||||
notify:
|
||||
- update sysctl
|
||||
- sysctl flush ipv4 route table
|
||||
|
||||
- name: "3.2.2 | PATCH | Ensure ICMP redirects are not accepted"
|
||||
debug:
|
||||
msg: "Control being set via Handler 'update sysctl' which writes to /etc/sysctl.d/99-sysctl.conf"
|
||||
notify:
|
||||
- sysctl flush ipv6 route table
|
||||
- update sysctl
|
||||
when: rhel9cis_ipv6_required
|
||||
- name: "3.2.2 | PATCH | Ensure packet redirect sending is disabled"
|
||||
sysctl:
|
||||
name: '{{ item.name }}'
|
||||
value: '{{ item.value }}'
|
||||
sysctl_set: yes
|
||||
state: present
|
||||
reload: yes
|
||||
ignoreerrors: yes
|
||||
notify: sysctl flush ipv4 route table
|
||||
with_items:
|
||||
- { name: net.ipv4.conf.all.send_redirects, value: 0 }
|
||||
- { name: net.ipv4.conf.default.send_redirects, value: 0 }
|
||||
when:
|
||||
- not rhel9cis_is_router
|
||||
- rhel9cis_rule_3_2_2
|
||||
tags:
|
||||
- level1-server
|
||||
- level1-workstation
|
||||
- sysctl
|
||||
- automated
|
||||
- patch
|
||||
- rule_3.2.2
|
||||
- sysctl
|
||||
- rule_3.2.2
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue