From 173e16b2c44e02c3b7f767d0e3f9890c3d81d8c6 Mon Sep 17 00:00:00 2001 From: Frank Dornheim <524257+conloos@users.noreply.github.com> Date: Sun, 5 Mar 2023 14:18:18 +0100 Subject: [PATCH] Add borgmatic_initialization_repo (bool) as option to disable init of repo --- README.md | 1 + meta/arguments_specs.yml | 4 ++++ tasks/04_init_borg_repo.yml | 1 + 3 files changed, 6 insertions(+) diff --git a/README.md b/README.md index 45ed8f1..3dc8f23 100644 --- a/README.md +++ b/README.md @@ -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_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_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_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` diff --git a/meta/arguments_specs.yml b/meta/arguments_specs.yml index 7822aa0..aa5cdf1 100644 --- a/meta/arguments_specs.yml +++ b/meta/arguments_specs.yml @@ -168,3 +168,7 @@ argument_specs: type: dict required: false 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. diff --git a/tasks/04_init_borg_repo.yml b/tasks/04_init_borg_repo.yml index cf264d8..a1b2bda 100644 --- a/tasks/04_init_borg_repo.yml +++ b/tasks/04_init_borg_repo.yml @@ -2,6 +2,7 @@ - name: Init repository when: - install_backup is not defined or install_backup + - borgmatic_initialization_repo is not defined or borgmatic_initialization_repo tags: - install_backup ansible.builtin.command: