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.
This commit is contained in:
Claude Sonnet 5
2026-08-12 19:23:57 +00:00
commit 7320b8da8d
18 changed files with 483 additions and 0 deletions
+48
View File
@@ -0,0 +1,48 @@
---
- name: Сброс пароля root MariaDB
hosts: all
become: yes
gather_facts: yes
tasks:
- name: Stop MariaDB service
ansible.builtin.systemd:
name: mariadb
state: stopped
- name: Start MariaDB in safe mode with skip-grant-tables
ansible.builtin.shell: |
mysqld_safe --skip-grant-tables &
sleep 5
async: 10
poll: 0
- name: Reset root password
ansible.builtin.shell: |
mysql -u root << EOF
FLUSH PRIVILEGES;
ALTER USER 'root'@'localhost' IDENTIFIED BY '{{ mariadb_root_password }}';
FLUSH PRIVILEGES;
EOF
- name: Stop MariaDB safe mode
ansible.builtin.systemd:
name: mariadb
state: stopped
- name: Start MariaDB normally
ansible.builtin.systemd:
name: mariadb
state: started
enabled: yes
- name: Create .my.cnf file for root user
ansible.builtin.copy:
content: |
[client]
user=root
password={{ mariadb_root_password }}
dest: /root/.my.cnf
mode: '0600'
owner: root
group: root