Skip to content

Commit 91914a4

Browse files
Use sshd service name if not targeting Debian-based systems
1 parent b9b1ccc commit 91914a4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

handlers/main.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
- name: Restart sshd
88
when: (lookup('env', 'GITHUB_ACTIONS') | length) == 0
99
ansible.builtin.service:
10-
name: ssh
10+
name: "{{ 'ssh' if ansible_os_family == 'Debian' else 'sshd' }}"
1111
state: restarted
1212

1313
- name: Reload systemd units

0 commit comments

Comments
 (0)