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.
34 lines
938 B
YAML
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
|