Add variable for the ssh service and ensure its enabled
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. The change will now delegate to all nodes within the swift cluster ensuring ssh is enabled and started. If SSH is not running everywhere at the same time swift ring distribution will not be possible later on in the role. Change-Id: Ifbc748019403f0c0712d5f241f118e998d2061d4 Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
This commit is contained in:
parent
f88a41dc92
commit
d40a020678
@ -47,3 +47,15 @@
|
||||
notify:
|
||||
- Restart swift services
|
||||
- Restart rsyslog
|
||||
|
||||
- name: Enable SSHD
|
||||
systemd:
|
||||
name: "{{ swift_sshd }}"
|
||||
state: started
|
||||
enabled: yes
|
||||
masked: no
|
||||
daemon_reload: yes
|
||||
delegate_to: "{{ item }}"
|
||||
with_items: "{{ groups['swift_proxy'] }}"
|
||||
when:
|
||||
- "inventory_hostname == ((groups['swift_proxy'] | intersect(ansible_play_hosts)) | list)[0]"
|
||||
|
@ -39,3 +39,5 @@ swift_service_distro_packages:
|
||||
- swift-proxy
|
||||
|
||||
swift_rsync_service_name: rsync
|
||||
|
||||
swift_sshd: ssh
|
@ -39,3 +39,5 @@ swift_service_distro_packages:
|
||||
- python-swift
|
||||
|
||||
swift_rsync_service_name: rsyncd
|
||||
|
||||
swift_sshd: sshd
|
@ -40,3 +40,5 @@ swift_service_distro_packages:
|
||||
- python-swift
|
||||
|
||||
swift_rsync_service_name: rsyncd
|
||||
|
||||
swift_sshd: sshd
|
Loading…
x
Reference in New Issue
Block a user