feat: Add borgmatic actions
This commit is contained in:
parent
18828d33bf
commit
5a4144f191
@ -32,4 +32,6 @@ borgmatic_name: "{{ inventory_hostname }}_{now}"
|
|||||||
borgmatic_compression: none
|
borgmatic_compression: none
|
||||||
borgmatic_passphrase: ""
|
borgmatic_passphrase: ""
|
||||||
|
|
||||||
|
borgmatic_actions: {}
|
||||||
|
|
||||||
borgmatic_restore_first: false
|
borgmatic_restore_first: false
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# {{ ansible_managed }}
|
||||||
|
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=borgmatic backup
|
Description=borgmatic backup
|
||||||
Wants=network-online.target
|
Wants=network-online.target
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# {{ ansible_managed }}
|
||||||
|
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Run borgmatic backup
|
Description=Run borgmatic backup
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
---
|
---
|
||||||
|
# {{ ansible_managed }}
|
||||||
|
|
||||||
repositories:
|
repositories:
|
||||||
{% for repository in borgmatic_repositories %}
|
{% for repository in borgmatic_repositories %}
|
||||||
@ -35,6 +36,17 @@ healthchecks:
|
|||||||
- finish
|
- finish
|
||||||
- fail
|
- fail
|
||||||
|
|
||||||
keep_daily: {{ borgmatic_retention.daily }}
|
{% if borgmatic_retention | length > 0 %}
|
||||||
keep_monthly: {{ borgmatic_retention.monthly }}
|
{% for param, value in borgmatic_retention %}
|
||||||
keep_weekly: {{ borgmatic_retention.weekly }}
|
keep_{{ param }}: {{ value }}
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if borgmatic_actions | length > 0 %}
|
||||||
|
{% for param, values in borgmatic_actions.items() %}
|
||||||
|
{{ param }}:
|
||||||
|
{% for value in values %}
|
||||||
|
- {{ value }}
|
||||||
|
{% endfor %}
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
Loading…
Reference in New Issue
Block a user