Skip to content

Commit

Permalink
Use sshd service name if not targeting Debian-based systems
Browse files Browse the repository at this point in the history
  • Loading branch information
medanthelinium committed Dec 16, 2024
1 parent b9b1ccc commit 91914a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion handlers/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
- name: Restart sshd
when: (lookup('env', 'GITHUB_ACTIONS') | length) == 0
ansible.builtin.service:
name: ssh
name: "{{ 'ssh' if ansible_os_family == 'Debian' else 'sshd' }}"
state: restarted

- name: Reload systemd units
Expand Down

0 comments on commit 91914a4

Please sign in to comment.