From 2d8d666633281dfde156f372a20fe01d0d789ff2 Mon Sep 17 00:00:00 2001 From: madhermit Date: Mon, 17 Feb 2020 04:41:12 -0800 Subject: [PATCH] Update: made the lock_wait optional argument configurable (#24) --- README.md | 1 + defaults/main.yml | 1 + templates/config.yaml.j2 | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 40812c5..478bc31 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,7 @@ An Ansible Role that sets up automated remote backups on the target machine. Use - `borg_exclude_patterns`: Paths or patterns to exclude from backup. See [official documentation](https://borgbackup.readthedocs.io/en/stable/usage/help.html#borg-help-patterns) for more. - `borg_one_file_system`: Don't cross file-system boundaries. Defaults to `true` - `borg_exclude_from`: Read exclude patterns from one or more separate named files, one pattern per line. +- `borg_lock_wait_time`: Config maximum seconds to wait for acquiring a repository/cache lock. Defaults to 5 seconds. - `borg_ssh_command`: Command to use instead of just "ssh". This can be used to specify ssh options. - `borg_remote_path`: Path to the borg executable on the remote. It will default to `borg`. - `borg_encryption_passcommand`: The standard output of this command is used to unlock the encryption key. diff --git a/defaults/main.yml b/defaults/main.yml index 67c4a57..c13fb28 100755 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -9,6 +9,7 @@ borgmatic_after_backup_command: [] borg_one_file_system: true borg_exclude_from: [] borg_encryption_passcommand: false +borg_lock_wait_time: 5 borg_ssh_command: false borg_remote_path: false borg_retention_policy: diff --git a/templates/config.yaml.j2 b/templates/config.yaml.j2 index 1b99238..c1e471c 100644 --- a/templates/config.yaml.j2 +++ b/templates/config.yaml.j2 @@ -70,7 +70,7 @@ storage: umask: 0077 # Maximum seconds to wait for acquiring a repository/cache lock. - lock_wait: 5 + lock_wait: {{ borg_lock_wait_time }} # Name of the archive. Borg placeholders can be used. See the output of # "borg help placeholders" for details. Default is