From cbf5bcaff34a477713d56e38702e299d0cc33bfb Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Mon, 19 Sep 2022 09:55:08 +0200 Subject: [PATCH] fix: disable PrintMotd only on RHEL 8+ --- templates/etc/ssh/sshd_config.j2 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/templates/etc/ssh/sshd_config.j2 b/templates/etc/ssh/sshd_config.j2 index cdd5f00..842946a 100644 --- a/templates/etc/ssh/sshd_config.j2 +++ b/templates/etc/ssh/sshd_config.j2 @@ -121,7 +121,9 @@ X11Forwarding {{ sshd_x11_forwarding }} #X11DisplayOffset 10 #X11UseLocalhost yes #PermitTTY yes +{% if ansible_distribution_major_version is version('7', '>') %} PrintMotd no +{% endif %} #PrintLastLog no TCPKeepAlive {{ sshd_tcp_keep_alive }} #UseLogin no