Distro: OL10.1
Full log:
TASK [cis_rhel_10 : 5.1.17 | PATCH | Ensure sshd MaxStartups is configured] ***
==> fatal: [default]: FAILED! => {"changed": false, "msg": "failed to validate: rc:255 error:/root/.ansible/tmp/ansible-moduletmp-1769531761.8153517-acbl7cw7/tmprgikcg4a line 37: Directive 'MaxStartups' is not allowed within a Match block\r\n"}
task: "5.1.17 | PATCH | Ensure sshd MaxStartups is configured"
ansible.builtin.lineinfile:
path: "{{ rhel10cis_sshd_config_file }}"
regexp: (?i)^(#|)\s*MaxStartups
line: 'MaxStartups {{ rhel10cis_ssh_maxstartups }}'
validate: sshd -t -f %s
notify: Restart sshd