Use a list for the expected ordering of intervals

This commit is contained in:
Kris Lamoureux 2021-06-04 00:50:14 -04:00
parent c6931ff48b
commit d9ab865fd9
Signed by: kris
GPG Key ID: 3EDA9C3441EDA925
2 changed files with 6 additions and 4 deletions

View File

@ -25,8 +25,10 @@ nginx_version: latest
rsnapshot:
- name: webserver
intervals:
hourly: 6
daily: 4
- name: hourly
count: 6
- name: daily
count: 4
cron:
- interval: hourly
minute: "*/2" # every even minute

View File

@ -44,8 +44,8 @@ cmd_rsnapshot_diff /usr/bin/rsnapshot-diff
# backup intervals #
####################
{% for backup in item.intervals %}
retain {{ backup }} {{ item.intervals[backup] }}
{% for interval in item.intervals %}
retain {{ interval.name }} {{ interval.count }}
{% endfor %}
############################################