# roles/minio_backup_target Stands up a **single-node, single-drive MinIO** S3 endpoint on the **Proxmox host** to serve as the off-cluster **backup target** for the k3s platform's **Velero** (volume/resource DR, R-STATE-03) and **CloudNativePG** (Keycloak DB Barman object store, R-IDP-05). A backup target — not primary storage — so a single drive is intentional. ## What it does (all additive + idempotent) 1. **ZFS dataset** `Storage/k3s-backups` — `compression=zstd`, `quota=100G`, `mountpoint=/mnt/Storage/k3s-backups`, **no sharenfs**. Uses `community.general.zfs` so re-runs are no-ops and existing datasets are never touched. 2. **`minio` system user/group** + a data dir (`…/k3s-backups/data`) it owns. 3. **MinIO + `mc` binaries** (pinned, checksummed). The Proxmox host has **no outbound internet**, so the binaries are downloaded on the **Ansible controller** and copied to the host. 4. **systemd unit** `minio.service` (Type=notify, hardened), bound to the host's **cluster-reachable `192.168.1.x` address** on port **9000** (console 9001) — auto-discovered from facts, assert-guarded. 5. **Buckets** `velero` + `cnpg`, a **scoped non-root access key** limited by an IAM policy to just those two buckets, plus the retained root creds for host-side admin. ## Credentials Supplied via the vaulted `inventory/group_vars/proxmox_hosts/vault.yml` (ansible-vault). Nothing is defaulted — a missing vault fails the play loudly: | var | purpose | |---|---| | `minio_backup_target_root_user` / `_root_password` | MinIO root (host admin only) | | `minio_backup_target_access_key` / `_secret_key` | scoped key handed to Velero + CNPG | The **same scoped key** is staged for the GitOps side, SOPS-encrypted, at `platform/backup/minio-credentials.sops.yaml`. ## Run ```bash cd infra/ansible ansible-galaxy collection install -r collections/requirements.yml # community.general (zfs) ansible-playbook playbooks/backup-minio.yml ``` ## Endpoint `http://:9000` — the S3 URL the cluster uses (path-style). Health: `GET /minio/health/ready` ⇒ 200. Verified reachable from an in-cluster pod at bring-up.