1
0
Fork 0
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:
L3D 2021-07-15 23:33:03 +02:00
parent 7776f1f586
commit eddc4c9a4b
Signed by: l3d
GPG key ID: CD08445BFF4313D1
6 changed files with 10 additions and 3 deletions

1
.gitignore vendored
View file

@ -1 +1,2 @@
.cache
.DS_Store .DS_Store

View file

@ -39,6 +39,7 @@ restic_archiver__repos: {}
# keep_monthly: 1 # keep_monthly: 1
# keep_yearly: 1 # keep_yearly: 1
# keep_within: 1 # keep_within: 1
# prune: true
# how long should we store all backups by default # how long should we store all backups by default
restic_archiver__keep: 5 restic_archiver__keep: 5
@ -84,4 +85,5 @@ submodules_versioncheck: false
restic_archiver__cache_config: false restic_archiver__cache_config: false
restic_archiver__cache_dir: '~/.cache/restic' restic_archiver__cache_dir: '~/.cache/restic'
restic_archiver__prune: false
``` ```

View file

@ -18,6 +18,7 @@ restic_archiver__repos: {}
# keep_monthly: 1 # keep_monthly: 1
# keep_yearly: 1 # keep_yearly: 1
# keep_within: 1 # keep_within: 1
# prune: true
# how long should we store all backups by default # how long should we store all backups by default
restic_archiver__keep: 5 restic_archiver__keep: 5
@ -63,3 +64,5 @@ submodules_versioncheck: false
restic_archiver__cache_config: false restic_archiver__cache_config: false
restic_archiver__cache_dir: '~/.cache/restic' restic_archiver__cache_dir: '~/.cache/restic'
restic_archiver__prune: false

View file

@ -2,6 +2,7 @@
galaxy_info: galaxy_info:
role_name: restic role_name: restic
author: L3D author: L3D
namespace: do1jlr
description: Role to deploy restic and setup backups. description: Role to deploy restic and setup backups.
license: MIT license: MIT
min_ansible_version: 2.11 min_ansible_version: 2.11

View file

@ -72,7 +72,7 @@ EOT
{%- endif -%} {%- endif -%}
{% if repo.keep_within is defined and repo.keep_within != None %} \ {% if repo.keep_within is defined and repo.keep_within != None %} \
--keep-within {{ repo.keep_within }} {% endif -%} --keep-within {{ repo.keep_within }} {% endif -%}
{%- if repo.prune|default(false) %} \ {%- if repo.prune|default(restic_archiver__prune) %} \
--prune {% endif %} --prune {% endif %}
{%- endmacro %} {%- endmacro %}

View file

@ -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' playbook_version_path: 'role-restic_archiver_roles-ansible_github.com.version'