Files
dotfiles/config/ansible/tasks/global/openssh-server.yml
Menno van Leeuwen 822704cd1d
Some checks failed
Nix Format Check / check-format (push) Failing after 37s
feat: restructure Ansible playbook and add SSH service handlers
2025-03-11 16:02:49 +01:00

21 lines
506 B
YAML

- name: Ensure openssh-server is installed
ansible.builtin.package:
name: openssh-server
state: present
- name: Ensure SSH service is enabled and running
ansible.builtin.service:
name: ssh
state: started
enabled: true
- name: Ensure SSH server configuration is proper
ansible.builtin.template:
src: templates/sshd_config.j2
dest: /etc/ssh/sshd_config
owner: root
group: root
mode: '0644'
validate: '/usr/sbin/sshd -t -f %s'
notify: Restart SSH service