mirror of
https://github.com/pigmonkey/spark.git
synced 2026-01-23 02:24:09 +00:00
replace sshd.socket with sshd.service
Existing users can delete the old override file:
rm -r /etc/systemd/system/sshd.socket.d
Closes #92
This commit is contained in:
parent
f17ff4a672
commit
335729fb2f
3 changed files with 6 additions and 18 deletions
|
|
@ -1,4 +1,6 @@
|
|||
---
|
||||
- name: restart sshd
|
||||
service: name=sshd.socket state=restarted
|
||||
service:
|
||||
name: sshd.service
|
||||
state: restarted
|
||||
when: ssh.enable_sshd == True
|
||||
|
|
|
|||
|
|
@ -8,33 +8,22 @@
|
|||
template:
|
||||
src: sshd_config.j2
|
||||
dest: /etc/ssh/sshd_config
|
||||
|
||||
- name: Create OpenSSH systemd unit file directory
|
||||
file:
|
||||
path: /etc/systemd/system/sshd.socket.d
|
||||
state: directory
|
||||
|
||||
- name: Push OpenSSH socket unit file
|
||||
template:
|
||||
src: sshd-socket-override.conf.j2
|
||||
dest: /etc/systemd/system/sshd.socket.d/override.conf
|
||||
notify:
|
||||
- reload systemd config
|
||||
- restart sshd
|
||||
|
||||
- name: Enable and start OpenSSH
|
||||
service:
|
||||
name: sshd.socket
|
||||
name: sshd.service
|
||||
enabled: yes
|
||||
state: started
|
||||
when: ssh.enable_sshd is defined and ssh.enable_sshd == True
|
||||
|
||||
- name: Disable and stop OpenSSH
|
||||
service:
|
||||
name: sshd.socket
|
||||
name: sshd.service
|
||||
enabled: no
|
||||
state: stopped
|
||||
when: ssh.enable_sshd is defined and ssh.enable_sshd == True
|
||||
when: ssh.enable_sshd is defined and ssh.enable_sshd == False
|
||||
|
||||
- name: Install sshfs
|
||||
pacman:
|
||||
|
|
|
|||
|
|
@ -1,3 +0,0 @@
|
|||
[Socket]
|
||||
ListenStream=
|
||||
ListenStream={{ ssh.port }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue