sshd/tasks/main.yml

24 lines
560 B
YAML
Raw Normal View History

2021-12-27 23:30:53 +03:00
---
2021-12-28 00:02:10 +03:00
- name: unbound | Load system-specific vars
include_vars: "{{ ansible_system | lower }}.yml"
- name: sshd | Deploy sshd_config
2021-12-27 23:30:53 +03:00
template:
2021-12-28 00:02:10 +03:00
src: "{{ sshd_config_template }}"
dest: /etc/ssh/sshd_config
mode: "{{ sshd_config_props.mode }}"
owner: "{{ sshd_config_props.owner }}"
group: "{{ sshd_config_props.group }}"
2021-12-27 23:30:53 +03:00
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