Files
infra/ansible/roles/backup_audit/defaults/main.yml
T
DmitryandClaude Sonnet 5 baef2c49b3 feat: derive PBS backup jobs and audit VMIDs from the service registry
- pve-backup-jobs.yml: each job's vmid list is now computed from
  homelab_services by backup.job instead of a hand-maintained CSV. Adding a
  service no longer needs a separate edit here (the forgotten-edit failure
  mode that left CT 148 emergency-bot without a backup).
- roles/backup_audit/defaults: backup_audit_pbs_vmids derived from
  homelab_services by the monitoring.backup_audit_vmid flag; single shared
  freshness threshold backup_audit_pbs_max_age_hours (48).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012uoq5AVK8mkBgg83Mq6o5V
2026-09-03 07:04:36 +03:00

25 lines
1.3 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
backup_audit_log_file: /var/log/homelab-backup-audit.log
backup_audit_timer_oncalendar: "*-*-* 06:00:00"
backup_audit_timer_randomized_delay: 10m
# Единый порог свежести для всех PBS-снапшотов. Вынесен отдельно, потому что
# сам список VMID теперь выводится из реестра и per-vmid значения в нём нет.
backup_audit_pbs_max_age_hours: 48
# VMID берутся из homelab_services по флагу monitoring.backup_audit_vmid, а не
# перечисляются вручную. Форма записи ({vmid, max_age_hours}) сохранена, чтобы
# вызывающий playbook при необходимости мог передать свой список с иными
# порогами — шаблон audit-pbs.sh.j2 читает именно эти два поля.
backup_audit_pbs_vmids: >-
{{ homelab_services.values()
| selectattr('monitoring.backup_audit_vmid', 'defined')
| selectattr('monitoring.backup_audit_vmid')
| map(attribute='vmid') | sort
| map('community.general.dict_kv', 'vmid')
| map('combine', {'max_age_hours': backup_audit_pbs_max_age_hours})
| list }}
backup_audit_restic_profiles: []
backup_audit_metrics_dir: /var/lib/node_exporter/textfile_collector