- Fix Enter key detection: handle multiple Enter key formats (\n, \r, \r\n) - Reduce flickering: lower render frequency from 60 FPS to 30 FPS - Fix menu bar visibility: re-render menu bar after content to prevent overwriting - Fix content positioning: explicit line positioning for categories and commands - Fix line shifting: clear lines before writing, control newlines manually - Limit visible items: prevent overflow with maxVisibleCategories/Commands - Improve CPU usage: increase sleep interval when no events processed This fixes: - Enter key not working for selection - Strong flickering of the application - Menu bar not visible or being overwritten - Top half of selection list not displayed - Lines being shifted/misaligned
6.7 KiB
6.7 KiB
Playbook Cleanup & Server Redeploy - Summary
Completed Tasks
Phase 1: Playbook Cleanup ✅
1.1 Redundante Diagnose-Playbooks konsolidiert
- ✅ Created
diagnose/gitea.yml- Consolidates:diagnose-gitea-timeouts.ymldiagnose-gitea-timeout-deep.ymldiagnose-gitea-timeout-live.ymldiagnose-gitea-timeouts-complete.ymlcomprehensive-gitea-diagnosis.yml
- ✅ Uses tags:
deep,completefor selective execution - ✅ Removed redundant playbooks
1.2 Redundante Fix-Playbooks konsolidiert
- ✅ Created
manage/gitea.yml- Consolidates:fix-gitea-timeouts.ymlfix-gitea-traefik-connection.ymlfix-gitea-ssl-routing.ymlfix-gitea-servers-transport.ymlfix-gitea-complete.ymlrestart-gitea-complete.ymlrestart-gitea-with-cache.yml
- ✅ Uses tags:
restart,fix-timeouts,fix-ssl,fix-servers-transport,complete - ✅ Removed redundant playbooks
1.3 Traefik-Diagnose/Fix-Playbooks konsolidiert
- ✅ Created
diagnose/traefik.yml- Consolidates:diagnose-traefik-restarts.ymlfind-traefik-restart-source.ymlmonitor-traefik-restarts.ymlmonitor-traefik-continuously.ymlverify-traefik-fix.yml
- ✅ Created
manage/traefik.yml- Consolidates:stabilize-traefik.ymldisable-traefik-auto-restarts.yml
- ✅ Uses tags:
restart-source,monitor,stabilize,disable-auto-restart - ✅ Removed redundant playbooks
1.4 Veraltete/Redundante Playbooks entfernt
- ✅ Removed
update-gitea-traefik-service.yml(deprecated) - ✅ Removed
ensure-gitea-traefik-discovery.yml(redundant) - ✅ Removed
test-gitea-after-fix.yml(temporär) - ✅ Removed
find-ansible-automation-source.yml(temporär)
1.5 Neue Verzeichnisstruktur erstellt
- ✅ Created
playbooks/diagnose/directory - ✅ Created
playbooks/manage/directory - ✅ Created
playbooks/setup/directory - ✅ Created
playbooks/maintenance/directory - ✅ Created
playbooks/deploy/directory
1.6 Playbooks verschoben
- ✅
setup-infrastructure.yml→setup/infrastructure.yml - ✅
deploy-complete.yml→deploy/complete.yml - ✅
deploy-image.yml→deploy/image.yml - ✅
deploy-application-code.yml→deploy/code.yml - ✅
setup-ssl-certificates.yml→setup/ssl.yml - ✅
setup-gitea-initial-config.yml→setup/gitea.yml - ✅
cleanup-all-containers.yml→maintenance/cleanup.yml
1.7 README aktualisiert
- ✅ Updated
playbooks/README.mdwith new structure - ✅ Documented consolidated playbooks
- ✅ Added usage examples with tags
- ✅ Listed removed/consolidated playbooks
Phase 2: Server Neustart-Vorbereitung ✅
2.1 Backup-Script erstellt
- ✅ Created
maintenance/backup-before-redeploy.yml - ✅ Backs up:
- Gitea data (volumes)
- SSL certificates (acme.json)
- Gitea configuration (app.ini)
- Traefik configuration
- PostgreSQL data (if applicable)
- ✅ Includes backup verification
2.2 Neustart-Playbook erstellt
- ✅ Created
setup/redeploy-traefik-gitea-clean.yml - ✅ Features:
- Automatic backup (optional)
- Stop and remove containers (preserves volumes/acme.json)
- Sync configurations
- Redeploy stacks
- Restore Gitea configuration
- Verify service discovery
- Final tests
2.3 Neustart-Anleitung erstellt
- ✅ Created
setup/REDEPLOY_GUIDE.md - ✅ Includes:
- Step-by-step guide
- Prerequisites
- Backup verification
- Rollback procedure
- Troubleshooting
- Common issues
2.4 Rollback-Playbook erstellt
- ✅ Created
maintenance/rollback-redeploy.yml - ✅ Features:
- Restore from backup
- Restore volumes, configurations, SSL certificates
- Restart stacks
- Verification
New Playbook Structure
playbooks/
├── setup/ # Initial Setup
│ ├── infrastructure.yml
│ ├── gitea.yml
│ ├── ssl.yml
│ ├── redeploy-traefik-gitea-clean.yml
│ └── REDEPLOY_GUIDE.md
├── deploy/ # Deployment
│ ├── complete.yml
│ ├── image.yml
│ └── code.yml
├── manage/ # Management (konsolidiert)
│ ├── traefik.yml
│ └── gitea.yml
├── diagnose/ # Diagnose (konsolidiert)
│ ├── gitea.yml
│ └── traefik.yml
└── maintenance/ # Wartung
├── backup.yml
├── backup-before-redeploy.yml
├── cleanup.yml
├── rollback-redeploy.yml
└── system.yml
Usage Examples
Gitea Diagnosis
# Basic
ansible-playbook -i inventory/production.yml playbooks/diagnose/gitea.yml
# Deep
ansible-playbook -i inventory/production.yml playbooks/diagnose/gitea.yml --tags deep
# Complete
ansible-playbook -i inventory/production.yml playbooks/diagnose/gitea.yml --tags complete
Gitea Management
# Restart
ansible-playbook -i inventory/production.yml playbooks/manage/gitea.yml --tags restart
# Fix timeouts
ansible-playbook -i inventory/production.yml playbooks/manage/gitea.yml --tags fix-timeouts
# Complete fix
ansible-playbook -i inventory/production.yml playbooks/manage/gitea.yml --tags complete
Redeploy
# With automatic backup
ansible-playbook -i inventory/production.yml playbooks/setup/redeploy-traefik-gitea-clean.yml \
--vault-password-file secrets/.vault_pass
# With existing backup
ansible-playbook -i inventory/production.yml playbooks/setup/redeploy-traefik-gitea-clean.yml \
--vault-password-file secrets/.vault_pass \
-e "backup_name=redeploy-backup-1234567890" \
-e "skip_backup=true"
Rollback
ansible-playbook -i inventory/production.yml playbooks/maintenance/rollback-redeploy.yml \
--vault-password-file secrets/.vault_pass \
-e "backup_name=redeploy-backup-1234567890"
Statistics
- Consolidated playbooks created: 4 (diagnose/gitea.yml, diagnose/traefik.yml, manage/gitea.yml, manage/traefik.yml)
- Redeploy playbooks created: 3 (redeploy-traefik-gitea-clean.yml, backup-before-redeploy.yml, rollback-redeploy.yml)
- Redundant playbooks removed: ~20+
- Playbooks moved to new structure: 7
- Documentation created: 2 (README.md updated, REDEPLOY_GUIDE.md)
Next Steps
- ✅ Test consolidated playbooks (dry-run where possible)
- ✅ Verify redeploy playbook works correctly
- ✅ Update CI/CD workflows to use new playbook paths if needed
- ⏳ Perform actual server redeploy when ready
Notes
- All consolidated playbooks use tags for selective execution
- Old wrapper playbooks (e.g.,
restart-traefik.yml) still exist and work - Backup playbook preserves all critical data
- Redeploy playbook includes comprehensive verification
- Rollback playbook allows quick recovery if needed