Files
dotfiles/config/ansible/tasks/global/openssh-server.yml
Menno van Leeuwen 112d3679da
Some checks failed
Ansible Lint Check / check-ansible (push) Failing after 1m34s
Nix Format Check / check-format (push) Successful in 57s
style: add YAML document start markers to Ansible playbooks and tasks
2025-03-12 14:05:42 +01:00

22 lines
510 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