mirror of
https://gitlab.com/s3lph/ansible-collection-dirvish
synced 2024-11-10 03:16:22 +01:00
Add support for dirvish-expire
This commit is contained in:
parent
373a1bcd16
commit
afe44fb1ab
4 changed files with 17 additions and 1 deletions
|
@ -6,6 +6,15 @@
|
||||||
dirvish_client_snapshot_scripts:
|
dirvish_client_snapshot_scripts:
|
||||||
- mysql-snapshot.sh
|
- mysql-snapshot.sh
|
||||||
|
|
||||||
|
# Advanced backup retention rule
|
||||||
|
dirvish_server_expire_rules:
|
||||||
|
# Keep first backup of the month for 6 months
|
||||||
|
- "* * 1 * * +6 months"
|
||||||
|
# Keep first backup of every quarter for 3 years
|
||||||
|
- "* * 1 1,4,7,10 * +3 years"
|
||||||
|
# Keep first backup of a year forever
|
||||||
|
- "* * 1 1 * never"
|
||||||
|
|
||||||
# Exclude the MariaDB data directory, as that's already covered by the snapshot
|
# Exclude the MariaDB data directory, as that's already covered by the snapshot
|
||||||
dirvish_server_client_exclude:
|
dirvish_server_client_exclude:
|
||||||
- 'var/lib/mysql/'
|
- 'var/lib/mysql/'
|
||||||
|
|
|
@ -7,7 +7,7 @@ namespace: s3lph
|
||||||
name: dirvish
|
name: dirvish
|
||||||
|
|
||||||
# The version of the collection. Must be compatible with semantic versioning
|
# The version of the collection. Must be compatible with semantic versioning
|
||||||
version: 0.5.0
|
version: 0.6.0
|
||||||
|
|
||||||
# The path to the Markdown (.md) readme file. This path is relative to the root of the collection
|
# The path to the Markdown (.md) readme file. This path is relative to the root of the collection
|
||||||
readme: README.md
|
readme: README.md
|
||||||
|
|
|
@ -18,6 +18,7 @@ dirvish_server_image_name: "%Y%m%d-%H%M%S"
|
||||||
dirvish_server_log_compression: gzip
|
dirvish_server_log_compression: gzip
|
||||||
dirvish_server_index_compression: gzip
|
dirvish_server_index_compression: gzip
|
||||||
dirvish_server_expire_default: "+31 days"
|
dirvish_server_expire_default: "+31 days"
|
||||||
|
dirvish_server_expire_rules: []
|
||||||
|
|
||||||
dirvish_server_exclude:
|
dirvish_server_exclude:
|
||||||
- lost+found/
|
- lost+found/
|
||||||
|
|
|
@ -9,6 +9,12 @@ tree: /
|
||||||
{% if item != inventory_hostname %}
|
{% if item != inventory_hostname %}
|
||||||
rsh: {{ hostvars[item].dirvish_server_client_rsh | default(dirvish_server_rsh) }}
|
rsh: {{ hostvars[item].dirvish_server_client_rsh | default(dirvish_server_rsh) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if hostvars[item].dirvish_server_expire_rules is defined and hostvars[item].dirvish_server_expire_rules | length > 0 %}
|
||||||
|
expire-rule:
|
||||||
|
{% for rule in hostvars[item].dirvish_server_expire_rules %}
|
||||||
|
{{ rule }}
|
||||||
|
{% endfor %}
|
||||||
|
{% endif%}
|
||||||
|
|
||||||
{% if hostvars[item].dirvish_server_client_exclude is defined and hostvars[item].dirvish_server_client_exclude | length > 0 %}
|
{% if hostvars[item].dirvish_server_client_exclude is defined and hostvars[item].dirvish_server_client_exclude | length > 0 %}
|
||||||
exclude:
|
exclude:
|
||||||
|
|
Loading…
Reference in a new issue