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:24:02 +00:00
commit 8ff6d59ba6
34 changed files with 2239 additions and 0 deletions
+40
View File
@@ -0,0 +1,40 @@
---
- name: Change SSH Port on Windows
hosts: windows
gather_facts: no
# ДОБАВИТЬ ЭТОТ БЛОК:
collections:
- ansible.windows
- community.windows
vars:
new_ssh_port: 22233
sshd_config_path: 'C:\ProgramData\ssh\sshd_config'
tasks:
- name: Allow new SSH port in Windows Firewall
# Теперь можно писать короче, так как коллекции подключили выше
win_firewall_rule:
name: "OpenSSH-Server-Custom-Port"
localport: "{{ new_ssh_port }}"
action: allow
direction: in
protocol: tcp
profiles: domain,private,public
state: present
enabled: yes
- name: Update Port in sshd_config
win_lineinfile:
path: "{{ sshd_config_path }}"
regexp: '^#?Port\s+\d+'
line: "Port {{ new_ssh_port }}"
state: present
notify: Restart Windows SSH
handlers:
- name: Restart Windows SSH
win_service:
name: sshd
state: restarted