ansible-edda/playbooks/tasks/hosts/sshd.yml

18 lines
425 B
YAML
Raw Normal View History

2022-09-11 20:55:30 +02:00
# SSH must be installed and enabled for ansible to even connect so we don't bother with installing
# and starting it.
- name: Configure sshd
template:
2022-09-21 23:57:15 +02:00
src: ./filesystem/common/etc/ssh/sshd_config.d/00-local.conf.j2
dest: /etc/ssh/sshd_config.d/00-local.conf
2022-09-11 20:55:30 +02:00
mode: 0600
register: sshd_conf
- name: Restart sshd
systemd:
name: sshd
enabled: yes
state: restarted
when:
sshd_conf is changed