mirror of
https://github.com/ansible-lockdown/RHEL9-CIS.git
synced 2025-12-27 23:43:06 +00:00
Fancy 3.3.7, fix 5.6.5
This commit is contained in:
parent
aaa05fa672
commit
9643e234cf
2 changed files with 8 additions and 13 deletions
|
|
@ -27,18 +27,13 @@
|
|||
- "'procps-ng' in ansible_facts.packages"
|
||||
|
||||
- name: POST | Update usr sysctl
|
||||
block:
|
||||
- name: POST | Set default.rp_filter
|
||||
ansible.builtin.lineinfile:
|
||||
path: /usr/lib/sysctl.d/50-default.conf
|
||||
regexp: '^net.ipv4.conf.default.rp_filter'
|
||||
line: net.ipv4.conf.default.rp_filter = 1
|
||||
|
||||
- name: POST | Set ALL rp_filter
|
||||
ansible.builtin.lineinfile:
|
||||
path: /usr/lib/sysctl.d/50-default.conf
|
||||
regexp: '^net.ipv4.conf.*.rp_filter'
|
||||
line: net.ipv4.conf.*.rp_filter = 1
|
||||
ansible.builtin.lineinfile:
|
||||
dest: /usr/lib/sysctl.d/50-default.conf
|
||||
regexp: "{{ item.regexp }}"
|
||||
line: "{{ item.line }}"
|
||||
loop:
|
||||
- { regexp: '^net.ipv4.conf.default.rp_filter', line: 'net.ipv4.conf.default.rp_filter = 1' }
|
||||
- { regexp: '^net.ipv4.conf.*.rp_filter', line: 'net.ipv4.conf.*.rp_filter = 1' }
|
||||
when:
|
||||
- rhel9cis_sysctl_update
|
||||
- not system_is_container
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue