Skip to content

Commit e7b5b93

Browse files
committed
Fix sshd handlers for Debian 12.
Debian 12, Ubuntu 22 and above need to re-run systemd generators to pull the updated sshd port config. https://discourse.ubuntu.com/t/sshd-now-uses-socket-based-activation-ubuntu-22-10-and-later/30189/14
1 parent 3b5b2e9 commit e7b5b93

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

handlers/main.yml

+4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
---
2+
- name: reload systemd
3+
systemd_service:
4+
daemon_reload: true
5+
26
- name: restart ssh
37
service:
48
name: "{{ security_sshd_name }}"

tasks/ssh.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@
2929
line: "GSSAPIAuthentication {{ security_ssh_gss_api_authentication }}"
3030
- regexp: "^X11Forwarding"
3131
line: "X11Forwarding {{ security_ssh_x11_forwarding }}"
32-
notify: restart ssh
32+
notify:
33+
- reload systemd
34+
- restart ssh
3335

3436
- name: Add configured users allowed to connect over ssh
3537
lineinfile:

0 commit comments

Comments
 (0)