Hide Forgot
Description of problem: When using the sshd system role to manage the /etc/ssh/sshd_config file, it does not add the ansible_managed variable contents to the top of the file. Version-Release number of selected component (if applicable): rhel-system-roles-1.7.3-2.el8.noarch How reproducible: Every time Steps to Reproduce: 1. Run playbook: - hosts: rhel8-server1 vars: sshd_PermitRootLogin: no sshd: Compression: true roles: - role: rhel-system-roles.sshd Actual results: The /etc/ssh/sshd_config file on rhel8-server1 does not have a comment at the top indicating the file is managed by Ansible.
With the current upstream code - I can reproduce the problem with tests/tests_config_namespace.yml but not with tests_set_common.yml - so I suspect it has something to do with the namespace handling
I can confirm that this is only an issue of the RHEL 8.5 package. But this was fixed in upstream as https://github.com/willshersystems/ansible-sshd/pull/168/ as well as in the RHEL 8.6 package. The only issue with the RHEL 8.5 is that there is a bogus indent and missing "{ansible_managed | comment }" in the generated configuration file. On the first sight, I do not see a simple workaround to get the configuration file without these issues in RHEL 8.5, but from functional point of view, it should not cause any issues (except for the "changed" reports after you update to RHEL 8.6). Can we close this as a NEXTRELEASE or add to the RHEL 8.6 errata to check if there is something we can do to prevent such issues in the future at least from the QE side?
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (rhel-system-roles bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2022:1896