Skip to content

Commit 174b6da

Browse files
committed
Rename sshd to ssh+enable/start it, fixes #187
The systemd unit file for ssh server is called ssh.service, and an alias for sshd was kept for backwards compatibility with older Debian versions. The alias apparently doesn't exist (the relevant symlink isn't created) if the service isn't enabled, so this resolves such cases.
1 parent a55a9c0 commit 174b6da

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

handlers/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
name: pveproxy
1111
state: restarted
1212

13-
- name: reload sshd configuration
14-
service:
15-
name: sshd
13+
- name: reload ssh server configuration
14+
ansible.builtin.systemd:
15+
name: ssh.service
1616
state: reloaded
1717

1818
- name: restart watchdog-mux

tasks/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
when:
2727
- "pve_manage_ssh | bool and pve_cluster_enabled | bool"
2828

29-
- name: Run handlers if needed (sshd reload)
29+
- name: Run handlers if needed (ssh server reload)
3030
meta: flush_handlers
3131

3232
- name: Enumerate all cluster hosts within the hosts file

tasks/ssh_cluster_config.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,13 @@
4848
{% endfor %}
4949
validate: "/usr/sbin/sshd -t -f %s"
5050
notify:
51-
- reload sshd configuration
51+
- reload ssh server configuration
52+
53+
- name: Enable and start SSH server
54+
ansible.builtin.systemd:
55+
name: ssh.service
56+
enabled: yes
57+
state: started
5258

5359
- name: Fetch a SSH public key to use for cluster joins
5460
ansible.builtin.slurp:

0 commit comments

Comments
 (0)