Add borgmatic_initialization_repo (bool) as option to disable init of repo

This commit is contained in:
Frank Dornheim 2023-03-05 14:18:18 +01:00
parent fa719dfce1
commit 173e16b2c4
3 changed files with 6 additions and 0 deletions

View File

@ -88,6 +88,7 @@ $ git clone https://github.com/borgbase/ansible-role-borgbackup.git roles/ansibl
- `borgmatic_cron_hour`: Hour when regular create and prune cron job will run. Defaults to `{{ 6 | random }}` - `borgmatic_cron_hour`: Hour when regular create and prune cron job will run. Defaults to `{{ 6 | random }}`
- `borgmatic_cron_minute`: Minute when regular create and prune cron job will run. Defaults to `{{ 59 | random }}` - `borgmatic_cron_minute`: Minute when regular create and prune cron job will run. Defaults to `{{ 59 | random }}`
- `borgmatic_hooks`: Hooks to monitor your backups e.g. with [Healthchecks](https://healthchecks.io/). See [official documentation](https://torsion.org/borgmatic/docs/how-to/monitor-your-backups/) for more. - `borgmatic_hooks`: Hooks to monitor your backups e.g. with [Healthchecks](https://healthchecks.io/). See [official documentation](https://torsion.org/borgmatic/docs/how-to/monitor-your-backups/) for more.
- `borgmatic_initialization_repo`: Auto initialization of the repo on the backup server. Defaults to `true`
- `borgmatic_large_repo`: Less frequent, monthly repo checking. Defaults to `true` - `borgmatic_large_repo`: Less frequent, monthly repo checking. Defaults to `true`
- `borgmatic_relocated_repo_access_is_ok`: Bypass Borg error about a repository that has been moved. Defaults to `false` - `borgmatic_relocated_repo_access_is_ok`: Bypass Borg error about a repository that has been moved. Defaults to `false`
- `borgmatic_store_atime`: Store atime into archive. Defaults to `true` - `borgmatic_store_atime`: Store atime into archive. Defaults to `true`

View File

@ -168,3 +168,7 @@ argument_specs:
type: dict type: dict
required: false required: false
description: Shell commands or scripts to execute before and after a backup or if an error has occurred. description: Shell commands or scripts to execute before and after a backup or if an error has occurred.
borgmatic_initialization_repo:
type: bool
required: false
description: Auto initialization of the repo on the backup server.

View File

@ -2,6 +2,7 @@
- name: Init repository - name: Init repository
when: when:
- install_backup is not defined or install_backup - install_backup is not defined or install_backup
- borgmatic_initialization_repo is not defined or borgmatic_initialization_repo
tags: tags:
- install_backup - install_backup
ansible.builtin.command: ansible.builtin.command: