The base role completely replaces /etc/ssh/sshd_config with a custom template, which overwrites Ubuntu's default configuration including Include directives and other distro-specific settings. This can cause sshd to enter a broken state after the handler fires — password auth, root login, and other defaults are silently removed, and sshd may not recover properly from the restart.
sshd_config.j2 template with a drop-in config file at /etc/ssh/sshd_config.d/99-hardening.conf that only overrides the specific settings we need to changesshd_config.j2 template filerestart sshd to reload ssh to avoid dropping active connectionsroles/base/tasks/main.yml: change from template to copy/drop-in taskroles/base/templates/sshd_config.j2: deletedroles/base/templates/sshd-hardening.conf.j2: new fileroles/base/handlers/main.yml: handler service name and state corrected