Adapt my old role to OpenBSD
parent
ac04c70812
commit
78d0ad0abf
|
@ -1,3 +1,7 @@
|
|||
# sshd
|
||||
|
||||
Ansible role for openssh-server
|
||||
|
||||
### Variables
|
||||
|
||||
Set `sshd_config_template` to template file you want to deploy as sshd configuration
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
|
||||
- name: sshd | Apply config
|
||||
service:
|
||||
name: sshd
|
||||
state: restarted
|
|
@ -0,0 +1,20 @@
|
|||
---
|
||||
|
||||
- name: sshd | Setup sshd_config
|
||||
template:
|
||||
src: "{{ sshd_config_template }}"
|
||||
dest: /etc/ssh/sshd_config
|
||||
mode: 0640
|
||||
owner: root
|
||||
group: root
|
||||
validate: sshd -t -f %s
|
||||
notify: sshd | Apply config
|
||||
|
||||
- name: sshd | Enable and start service
|
||||
service:
|
||||
name: sshd
|
||||
state: started
|
||||
enabled: yes
|
||||
|
||||
- name: sshd | Run handlers
|
||||
meta: flush_handlers
|
Loading…
Reference in New Issue