Files
osticket-ansible/enable-root-ssh.yml
Claude Sonnet 5 7320b8da8d Restore from Gitea ZIP snapshot (12.08.2026) after full instance reinstall
Git history was lost when the previous Gitea instance was wiped and
reinstalled due to an unresolved corruption bug — this commit is the
last known-good file content, exported before the reinstall. Prior
commit history is not recoverable through this path.
2026-08-12 19:23:57 +00:00

34 lines
938 B
YAML

---
- name: Включение root доступа по SSH
hosts: all
become: yes
gather_facts: yes
tasks:
- name: Разрешить root логин через SSH
ansible.builtin.lineinfile:
path: /etc/ssh/sshd_config
regexp: '^#?PermitRootLogin'
line: 'PermitRootLogin yes'
backup: yes
notify: Restart SSH
- name: Разрешить аутентификацию по паролю для root (если нужно)
ansible.builtin.lineinfile:
path: /etc/ssh/sshd_config
regexp: '^#?PasswordAuthentication'
line: 'PasswordAuthentication yes'
notify: Restart SSH
- name: Убедиться, что SSH сервис запущен
ansible.builtin.systemd:
name: ssh
state: started
enabled: yes
handlers:
- name: Restart SSH
ansible.builtin.systemd:
name: ssh
state: restarted