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

18 lines
425 B
YAML

# 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:
src: ./filesystem/common/etc/ssh/sshd_config.d/00-local.conf.j2
dest: /etc/ssh/sshd_config.d/00-local.conf
mode: 0600
register: sshd_conf
- name: Restart sshd
systemd:
name: sshd
enabled: yes
state: restarted
when:
sshd_conf is changed