Files
gitlab-mirror/roles/sshd/tasks/main.yml
2026-06-08 14:15:09 +04:00

27 lines
751 B
YAML

---
- name: "Install an OpenSSH server"
ansible.builtin.include_tasks: "install.yml"
- name: "Configure SSH algorithms"
ansible.builtin.include_tasks: "algorithms.yml"
- name: "Configure authentication methods"
ansible.builtin.include_tasks: "authentication.yml"
- name: "Configure SSH encryption keys"
ansible.builtin.include_tasks: "encryption.yml"
- name: "Configure additional restrictions"
ansible.builtin.include_tasks: "restrictions.yml"
- name: "Configure whitelists"
ansible.builtin.include_tasks: "whitelists.yml"
- name: "Log at VERBOSE level"
notify: "Restart ssh"
ansible.builtin.lineinfile:
path: /etc/ssh/sshd_config
regexp: '^#?LogLevel'
line: 'LogLevel VERBOSE'
validate: /usr/sbin/sshd -t -f %s