Add borgmatic

This commit is contained in:
uumas
2025-03-31 03:15:14 +03:00
parent 0deed89c3f
commit 0db60e2d60
12 changed files with 344 additions and 0 deletions

View File

@@ -0,0 +1,65 @@
---
argument_specs:
main:
short_description: Borgmatic config
description:
- Creates a bormatic configuration in /etc/borgmatic.d/ and creates the repos
options:
borgmatic_config_name:
description:
- Name of the borgmatic config.
- Must be unique within the (source) host.
type: str
required: true
borgmatic_config_directories:
description: Directories to backup
type: list
required: true
elements: str
borgmatic_config_encryption_passphrase:
description: Passphrase for borg repo encryption
type: str
required: true
borgmatic_config_targets:
description:
- List of backup targets for this config.
- All backup targets and directories must be listed in borgmatic_targets.
- Defaults to all defined in borgmatic_targets.
type: list
required: false
elements: dict
options:
host:
description: Target hostname
type: str
required: true
directories:
description: Directories on the host where backup repos will be created under
type: list
required: true
elements: str
borgmatic_config_backup_frequency:
description: How often to take backups. Defaults to once per hour.
type: dict
required: false
default:
unit: h
amount: 1
options:
unit:
description: Time unit
type: str
required: true
choices:
- min
- h
- d
amount:
description: Every how many time units to take backpus
type: int
required: true
borgmatic_config_keep_backups_months:
description: How many months to keep backups for
type: int
required: false
default: 6