mirror of
https://github.com/roles-ansible/ansible_role_restic_archiver.git
synced 2024-08-16 10:09:49 +02:00
improve prune settings
This commit is contained in:
parent
7776f1f586
commit
eddc4c9a4b
6 changed files with 10 additions and 3 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1 +1,2 @@
|
|||
.cache
|
||||
.DS_Store
|
|
@ -39,6 +39,7 @@ restic_archiver__repos: {}
|
|||
# keep_monthly: 1
|
||||
# keep_yearly: 1
|
||||
# keep_within: 1
|
||||
# prune: true
|
||||
|
||||
# how long should we store all backups by default
|
||||
restic_archiver__keep: 5
|
||||
|
@ -84,4 +85,5 @@ submodules_versioncheck: false
|
|||
|
||||
restic_archiver__cache_config: false
|
||||
restic_archiver__cache_dir: '~/.cache/restic'
|
||||
restic_archiver__prune: false
|
||||
```
|
||||
|
|
|
@ -18,6 +18,7 @@ restic_archiver__repos: {}
|
|||
# keep_monthly: 1
|
||||
# keep_yearly: 1
|
||||
# keep_within: 1
|
||||
# prune: true
|
||||
|
||||
# how long should we store all backups by default
|
||||
restic_archiver__keep: 5
|
||||
|
@ -63,3 +64,5 @@ submodules_versioncheck: false
|
|||
|
||||
restic_archiver__cache_config: false
|
||||
restic_archiver__cache_dir: '~/.cache/restic'
|
||||
|
||||
restic_archiver__prune: false
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
galaxy_info:
|
||||
role_name: restic
|
||||
author: L3D
|
||||
namespace: do1jlr
|
||||
description: Role to deploy restic and setup backups.
|
||||
license: MIT
|
||||
min_ansible_version: 2.11
|
||||
|
|
|
@ -72,7 +72,7 @@ EOT
|
|||
{%- endif -%}
|
||||
{% if repo.keep_within is defined and repo.keep_within != None %} \
|
||||
--keep-within {{ repo.keep_within }} {% endif -%}
|
||||
{%- if repo.prune|default(false) %} \
|
||||
{%- if repo.prune|default(restic_archiver__prune) %} \
|
||||
--prune {% endif %}
|
||||
{%- endmacro %}
|
||||
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
---
|
||||
playbook_version_number: 44 # should be int
|
||||
playbook_version_number: 45 # should be int
|
||||
playbook_version_path: 'role-restic_archiver_roles-ansible_github.com.version'
|
||||
|
|
Loading…
Reference in a new issue