mirror of
https://github.com/ansible-lockdown/RHEL9-CIS.git
synced 2025-12-24 22:23:06 +00:00
Check for existence of sshd_config.d/50-redhat.conf before trying to modify it
Signed-off-by: polski-g <polski_g@sent.at>
This commit is contained in:
parent
9ee1498c98
commit
f564135e72
2 changed files with 10 additions and 0 deletions
|
|
@ -276,6 +276,7 @@
|
|||
notify: Restart sshd
|
||||
|
||||
- name: "5.1.10 | PATCH | Ensure sshd DisableForwarding is enabled | override"
|
||||
when: discovered_sshd_50_redhat_file.stat.exists
|
||||
ansible.builtin.lineinfile:
|
||||
path: /etc/ssh/sshd_config.d/50-redhat.conf
|
||||
regexp: ^(?i)(#|)\s*X11Forwarding
|
||||
|
|
@ -298,6 +299,7 @@
|
|||
- NIST800-53R5_IA-5
|
||||
block:
|
||||
- name: "5.1.11 | PATCH | Ensure sshd GSSAPIAuthentication is disabled | redhat file"
|
||||
when: discovered_sshd_50_redhat_file.stat.exists
|
||||
ansible.builtin.lineinfile:
|
||||
path: /etc/ssh/sshd_config.d/50-redhat.conf
|
||||
regexp: ^(?i)(#|)\s*GSSAPIAuthentication
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue