From 3c53cd620778cf595b5215be9f9063f9b3ab2346 Mon Sep 17 00:00:00 2001 From: Will Szumski Date: Fri, 21 Mar 2025 17:46:21 +0000 Subject: [PATCH 1/2] Fix dropin directory creation *.conf was mistaken included in this path. --- ansible/roles/sshd/tasks/configure.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/roles/sshd/tasks/configure.yml b/ansible/roles/sshd/tasks/configure.yml index 377b3d745..511f30a5c 100644 --- a/ansible/roles/sshd/tasks/configure.yml +++ b/ansible/roles/sshd/tasks/configure.yml @@ -3,7 +3,7 @@ - name: Ensure drop in directory exists file: - path: /etc/ssh/sshd_config.d/*.conf + path: /etc/ssh/sshd_config.d/ state: directory owner: root group: root From 0363030bb9654b591659beec85d7f78ba5fa3984 Mon Sep 17 00:00:00 2001 From: Pierre Riteau Date: Fri, 21 Mar 2025 19:06:04 +0100 Subject: [PATCH 2/2] Clarify naming of extra configuration files --- ansible/roles/sshd/tasks/configure.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ansible/roles/sshd/tasks/configure.yml b/ansible/roles/sshd/tasks/configure.yml index 511f30a5c..359d782f6 100644 --- a/ansible/roles/sshd/tasks/configure.yml +++ b/ansible/roles/sshd/tasks/configure.yml @@ -10,12 +10,13 @@ mode: 700 become: true -- name: Ensure drop in directory is included +- name: Ensure drop in configuration is included blockinfile: dest: /etc/ssh/sshd_config - content: | - # To modify the system-wide sshd configuration, create a *.conf file under - # /etc/ssh/sshd_config.d/ which will be automatically included below + content: | + # To modify the system-wide sshd configuration, create .conf + # files under /etc/ssh/sshd_config.d/ which will be automatically + # included below. Include /etc/ssh/sshd_config.d/*.conf state: present insertafter: "# default value."