summaryrefslogtreecommitdiff
path: root/roles
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2022-09-10 09:28:15 +0300
committerLars Wirzenius <liw@liw.fi>2022-09-10 09:28:15 +0300
commit772e327a55685283eeeaf8deae3ba1663b0cd167 (patch)
treec748c05fa90d7c6c92438148f29935cd2f54300b /roles
parent22ba6cecc6bdc370f36ea2a71077aa3f8a9e2f67 (diff)
downloaddebian-ansible-772e327a55685283eeeaf8deae3ba1663b0cd167.tar.gz
sshd: make sure sshd_config includes sshd_config.d/*.conf
Sponsored-by: author
Diffstat (limited to 'roles')
-rw-r--r--roles/sshd/tasks/main.yml6
1 files changed, 6 insertions, 0 deletions
diff --git a/roles/sshd/tasks/main.yml b/roles/sshd/tasks/main.yml
index 3855e30..d5ce5c2 100644
--- a/roles/sshd/tasks/main.yml
+++ b/roles/sshd/tasks/main.yml
@@ -3,6 +3,12 @@
[ "{{ sshd_version }}" = "1" ] || \
(echo "Unexpected version {{ sshd_version }}" 1>&2; exit 1)
+- name: "Configure SSH server to read config files in sshd_config.d"
+ lineinfile:
+ path: /etc/ssh/sshd_config
+ regexp: "Include /etc/ssh/sshd_config.d"
+ line: "Include /etc/ssh/sshd_config.d/*.conf"
+
- name: "Set SSH host identity"
when: sshd_host_key is defined and sshd_host_cert is defined
copy: