restic writes both regions itself, but the ad-hoc backups under asxpio-ops/, the Terraform state and the k8s state only ever went to hel1. Sync each hel1 bucket into its fsn1 twin every morning from asxpio-services, with rclone pinned like everything else. restic/ is excluded, so the independent fsn1 restic repositories are never touched. A run that would delete more than 1000 objects stops and mails, so a mistake on the hel1 side cannot empty the replica the next morning. The first dry run copied 23 objects and deleted none. Assisted-by: Claude:opus-5-5
60 lines
1.7 KiB
YAML
60 lines
1.7 KiB
YAML
---
|
|
# Everything the deploy pipeline manages. Idempotent: a run with nothing
|
|
# to change touches nothing and restarts nothing.
|
|
#
|
|
# ansible-playbook site.yaml --check --diff # dry run
|
|
# ansible-playbook site.yaml --tags traefik # one service
|
|
#
|
|
# Host bootstrap (WireGuard, SSH hardening, s3fs, swap) is in playbooks/
|
|
# and is run by hand.
|
|
|
|
- name: Host baseline
|
|
hosts: asxpio
|
|
become: true
|
|
roles:
|
|
- { role: base, tags: [base] }
|
|
|
|
- name: asxpio-ops services
|
|
hosts: ops_servers
|
|
become: true
|
|
roles:
|
|
- { role: traefik, tags: [traefik] }
|
|
- { role: crawler_alert, tags: [crawler_alert] }
|
|
|
|
- name: asxpio-services services
|
|
hosts: services_servers
|
|
become: true
|
|
roles:
|
|
- { role: sillytavern, tags: [sillytavern] }
|
|
- { role: minecraft, tags: [minecraft] }
|
|
- { role: minecraft_fossils, tags: [minecraft_fossils] } # retired: stops it, before xmpp needs the RAM
|
|
- { role: xmpp, tags: [xmpp] }
|
|
- { role: xray, tags: [xray] }
|
|
|
|
# Late: restarting Forgejo briefly cuts the runner off from its job log
|
|
- name: Forgejo
|
|
hosts: ops_servers
|
|
become: true
|
|
roles:
|
|
- { role: forgejo, tags: [forgejo] }
|
|
|
|
- name: Backups
|
|
hosts: asxpio
|
|
become: true
|
|
roles:
|
|
- { role: restic_backup, tags: [restic] }
|
|
|
|
- name: Bucket replica
|
|
hosts: services_servers
|
|
become: true
|
|
roles:
|
|
- { role: s3_replicate, tags: [s3_replicate] }
|
|
|
|
# Last: when the pipeline changes the runner it recreates the container
|
|
# that is running the pipeline. Everything else is done by then; that job
|
|
# ends as failed and the next run confirms the result.
|
|
- name: Forgejo runner
|
|
hosts: services_servers
|
|
become: true
|
|
roles:
|
|
- { role: forgejo_runner, tags: [forgejo_runner] }
|