Browse Source

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>
changes/47/606847/1
Kevin Carter 8 months ago
parent
commit
45bb9631b1
No account linked to committer's email address
4 changed files with 7 additions and 2 deletions
  1. 1
    2
      tasks/repo_post_install.yml
  2. 2
    0
      vars/debian.yml
  3. 2
    0
      vars/redhat.yml
  4. 2
    0
      vars/suse.yml

+ 1
- 2
tasks/repo_post_install.yml View File

@@ -30,7 +30,7 @@
30 30
 
31 31
 - name: Enable SSHD
32 32
   systemd:
33
-    name: sshd
33
+    name: "{{ repo_server_sshd }}"
34 34
     state: started
35 35
     enabled: yes
36 36
     masked: no
@@ -86,4 +86,3 @@
86 86
     config_type: "ini"
87 87
   notify:
88 88
     - reload pypiserver
89
-

+ 2
- 0
vars/debian.yml View File

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

+ 2
- 0
vars/redhat.yml View File

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

+ 2
- 0
vars/suse.yml View File

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

Loading…
Cancel
Save