Add variable for the ssh service

The ssh service on ubuntu based systems is "ssh" which is established by
the service unit path `/lib/systemd/system/ssh.service`. When running
the service will respond to the name "sshd" however this is just an
alias. This change adds a variable to set the service unit name
based on the distro family which will allow the service to start should
it be masked.

Change-Id: I04b9f5ed761270c0bb76b607a6562b511c6f4773
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
This commit is contained in:
Kevin Carter 2018-09-30 10:00:05 -05:00
parent f34f241c37
commit 45bb9631b1
No known key found for this signature in database
GPG Key ID: 9443251A787B9FB3
4 changed files with 7 additions and 2 deletions

View File

@ -30,7 +30,7 @@
- name: Enable SSHD
systemd:
name: sshd
name: "{{ repo_server_sshd }}"
state: started
enabled: yes
masked: no
@ -86,4 +86,3 @@
config_type: "ini"
notify:
- reload pypiserver

View File

@ -32,3 +32,5 @@ repo_pkg_cache_server_distro_packages:
repo_lsyncd_config_file: /etc/lsyncd/lsyncd.conf.lua
repo_lsyncd_defaults_file: /etc/default/lsyncd
repo_server_sshd: ssh

View File

@ -34,3 +34,5 @@ repo_pkg_cache_server_distro_packages:
repo_lsyncd_config_file: /etc/lsyncd.conf
repo_lsyncd_defaults_file: /etc/sysconfig/lsyncd
repo_server_sshd: sshd

View File

@ -33,3 +33,5 @@ repo_pkg_cache_server_distro_packages:
repo_lsyncd_config_file: /etc/lsyncd/lsyncd.conf
repo_lsyncd_defaults_file: /etc/sysconfig/lsyncd
repo_server_sshd: sshd