Update ssh service name for modern debian based systems.

This is now 'ssh' rather than 'sshd'.

Change-Id: I210403b51c09fd4f2ec0aba22ff8810f53a820ac
This commit is contained in:
Jonathan Rosser 2024-07-17 09:25:18 +01:00
parent 0b46e32def
commit 6f32d3562f

View File

@ -32,8 +32,12 @@
name: openssh-server
state: present
- name: Ensure sshd is running
vars:
_ssh_service_name:
redhat: sshd
debian: ssh
service:
name: sshd
name: "{{ _ssh_service_name[ansible_facts['os_family'] | lower] }}"
state: started
enabled: yes
post_tasks: