From b5e7db6b83a8d1d88e2dc45e253b092a6be767ee Mon Sep 17 00:00:00 2001 From: Stephen Smoogen Date: Tue, 17 Jan 2023 17:41:57 -0500 Subject: [PATCH] Fix sshd_config for Fedora 36+ I have probably made this a bit wordy but I have found long jinja2 logic statements to be a bit hard to debug or go off the rails. So I copied the section for Red Hat and used it for Fedora. Signed-off-by: Stephen Smoogen --- roles/basessh/templates/sshd_config | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/roles/basessh/templates/sshd_config b/roles/basessh/templates/sshd_config index 7a8707a609..2b06066862 100644 --- a/roles/basessh/templates/sshd_config +++ b/roles/basessh/templates/sshd_config @@ -24,6 +24,11 @@ MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,umac-128-etm@op # /etc/ssh/sshd_config.d/ which will be automatically included below Include /etc/ssh/sshd_config.d/*.conf {% endif %} +{% if ansible_distribution_major_version|int >= 36 and ansible_distribution == 'Fedora' %} +# To modify the system-wide sshd configuration, create a *.conf file under +# /etc/ssh/sshd_config.d/ which will be automatically included below +Include /etc/ssh/sshd_config.d/*.conf +{% endif %} HostKey /etc/ssh/ssh_host_rsa_key