mirror of
https://github.com/pigmonkey/spark.git
synced 2026-01-23 02:24:09 +00:00
add sshd handler
This commit is contained in:
parent
2e84ecca61
commit
27064030a3
3 changed files with 10 additions and 0 deletions
4
roles/ssh/handlers/main.yml
Normal file
4
roles/ssh/handlers/main.yml
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
- name: restart sshd
|
||||
service: name=sshd.socket state=restarted
|
||||
when: ssh.enable_sshd == True
|
||||
3
roles/ssh/meta/main.yml
Normal file
3
roles/ssh/meta/main.yml
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
dependencies:
|
||||
- { role: systemd }
|
||||
|
|
@ -10,6 +10,9 @@
|
|||
|
||||
- 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 enabled=yes state=started
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue