Use distro-specific SSH service name

Some Ubuntu 24.04 images do not contain sshd service anymore,
thus fail on the handler.

Let's use distro-specific service name, like we do in other places.

Change-Id: Ie5b0f215cceb8e8002b75543f4050042732525a7
This commit is contained in:
Dmitriy Rabotyagov 2025-02-26 15:33:52 +01:00
parent db32a0016c
commit 84b01a9684
3 changed files with 5 additions and 1 deletions

View File

@ -45,7 +45,7 @@
- name: Restart sshd
ansible.builtin.service:
name: sshd
name: "{{ lxc_ssh_service_name }}"
state: "restarted"
enabled: true

View File

@ -45,7 +45,9 @@ _lxc_hosts_distro_packages:
lxc_hosts_remove_distro_packages:
- dnsmasq
lxc_ssh_service_name: ssh
lxc_xz_bin: xz
system_config_dir: "/etc/default"
systemd_utils_prefix: "/lib/systemd"

View File

@ -38,4 +38,6 @@ _lxc_hosts_distro_packages:
- unzip
- xz
lxc_ssh_service_name: sshd
lxc_xz_bin: xz