From 45bb9631b1e2ec8c460e87af213c97746c6ac645 Mon Sep 17 00:00:00 2001 From: Kevin Carter Date: Sun, 30 Sep 2018 10:00:05 -0500 Subject: [PATCH] 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 --- tasks/repo_post_install.yml | 3 +-- vars/debian.yml | 2 ++ vars/redhat.yml | 2 ++ vars/suse.yml | 2 ++ 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/tasks/repo_post_install.yml b/tasks/repo_post_install.yml index 2312e9f..465d6cd 100644 --- a/tasks/repo_post_install.yml +++ b/tasks/repo_post_install.yml @@ -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 - diff --git a/vars/debian.yml b/vars/debian.yml index 9b1b3de..a59c055 100644 --- a/vars/debian.yml +++ b/vars/debian.yml @@ -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 diff --git a/vars/redhat.yml b/vars/redhat.yml index 71c5203..d2017fa 100644 --- a/vars/redhat.yml +++ b/vars/redhat.yml @@ -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 diff --git a/vars/suse.yml b/vars/suse.yml index e9a4468..52867be 100644 --- a/vars/suse.yml +++ b/vars/suse.yml @@ -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