Closed gpoblon closed 3 months ago
Just realized it requires quotes... closing, my bad.
@gpoblon thanks for posting the solution! This in indeed a YAML parsing problem, we can't solve this. The user is required to quote string values, that can also be interpreted as bool by the YAML parser.
Description
Running devsec ssh hardening role fails when
ssh_permit_root_login
is set. I tried with the following values:ssh_permit_root_login: false
ssh_permit_root_login: no
ssh_permit_root_login: yes
When I run the playbook withoutssh_permit_root_login
set, it works without issues.Reproduction steps
TASK [devsec.hardening.ssh_hardening : Create sshd_config and set permissions to root/600] **** fatal: [localhost]: FAILED! => {"changed": false, "checksum": "382bac9e38b410bdc5ff2434ab936398f4b61e91", "exit_status": 255, "msg": "failed to validate", "stderr": "/home/doc/.ansible/tmp/ansible-tmp-1717347306.0279121-22803-160195413881422/source line 14: unsupported option \"False\".\r\n", "stderr_lines": ["/home/doc/.ansible/tmp/ansible-tmp-1717347306.0279121-22803-160195413881422/source line 14: unsupported option \"False\"."], "stdout": "", "stdout_lines": []}
Additional information
No response