From 5c4803e9a4ebf50dd37be4e9fd5a9c7a59bea4a8 Mon Sep 17 00:00:00 2001 From: Martin Schurz Date: Sun, 9 Feb 2025 12:12:12 +0100 Subject: [PATCH] Accept strings and lists for ssh_allow_users Signed-off-by: Martin Schurz --- roles/ssh_hardening/templates/opensshd.conf.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/ssh_hardening/templates/opensshd.conf.j2 b/roles/ssh_hardening/templates/opensshd.conf.j2 index 4f2a9f508..9d05ca5e1 100644 --- a/roles/ssh_hardening/templates/opensshd.conf.j2 +++ b/roles/ssh_hardening/templates/opensshd.conf.j2 @@ -171,7 +171,7 @@ DenyUsers {{ ssh_deny_users }} {% endif %} {% if ssh_allow_users %} -AllowUsers {{ ssh_allow_users }} +AllowUsers {{ ssh_allow_users if (ssh_allow_users is string) else (ssh_allow_users|join(' ')) }} {% endif %} {% if ssh_deny_groups %}