diff options
| author | Ahmed Abdelhalim <[email protected]> | 2026-07-21 12:41:07 +0200 |
|---|---|---|
| committer | Ahmed Abdelhalim <[email protected]> | 2026-07-21 12:46:53 +0200 |
| commit | 0be7583911bfe15276b736697caebb3752da56b6 (patch) | |
| tree | 869bbd8b270f22c6c02460b20d3146dcc04e5be3 /roles/backup/meta | |
| parent | 34157b435c2103ecb87c26c1368c6ccf7b3d6410 (diff) | |
Fix restic install and add backup role
Co-Authored-By: Claude.ai
Diffstat (limited to 'roles/backup/meta')
| -rw-r--r-- | roles/backup/meta/argument_specs.yml | 57 | ||||
| -rw-r--r-- | roles/backup/meta/main.yml | 22 |
2 files changed, 79 insertions, 0 deletions
diff --git a/roles/backup/meta/argument_specs.yml b/roles/backup/meta/argument_specs.yml new file mode 100644 index 00000000..8dd86192 --- /dev/null +++ b/roles/backup/meta/argument_specs.yml @@ -0,0 +1,57 @@ +--- +argument_specs: + main: + options: + backup_name: + type: "str" + description: "Unique name for this backup job — used for systemd unit and script names" + default: "backup" + backup_paths: + type: "list" + elements: "str" + description: "List of paths to back up" + required: true + backup_systemd_schedule: + type: "str" + description: "systemd OnCalendar schedule (e.g. daily, weekly, *-*-* 02:00) — used on systemd hosts" + default: "daily" + backup_cron_schedule: + type: "str" + description: "cron schedule (e.g. 0 0 * * *) — used on OpenRC hosts" + default: "0 0 * * *" + backup_retention_daily: + type: "int" + description: "Number of daily snapshots to keep" + default: 7 + backup_retention_weekly: + type: "int" + description: "Number of weekly snapshots to keep" + default: 4 + backup_retention_monthly: + type: "int" + description: "Number of monthly snapshots to keep" + default: 6 + backup_repo: + type: "str" + description: "Restic repository URL (e.g. s3:http://machine.local:3900/backups)" + required: true + backup_access_key_id: + type: "str" + description: "S3 access key ID" + required: true + backup_secret_access_key: + type: "str" + description: "S3 secret access key" + required: true + backup_password: + type: "str" + description: "Restic repository encryption password" + required: true + backup_user: + type: "str" + description: "System user to run the backup as" + default: "backup" + backup_group: + type: "str" + description: "System group for the backup user" + default: "backup" diff --git a/roles/backup/meta/main.yml b/roles/backup/meta/main.yml new file mode 100644 index 00000000..26db6058 --- /dev/null +++ b/roles/backup/meta/main.yml @@ -0,0 +1,22 @@ +--- +dependencies: + - role: "bash" + - role: "restic" +galaxy_info: + author: "a14m" + description: "Backup a directory to S3 using restic" + license: "MIT" + min_ansible_version: "2.18" + platforms: + - name: "ArchLinux" + versions: + - "all" + - name: "Ubuntu" + versions: + - "noble" + - name: "Debian" + versions: + - "bookworm" + - name: "Alpine" + versions: + - "all" |
