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: rsnapshot:
- name: webserver - name: webserver
intervals: intervals:
hourly: 6 - name: hourly
daily: 4 count: 6
- name: daily
count: 4
cron: cron:
- interval: hourly - interval: hourly
minute: "*/2" # every even minute minute: "*/2" # every even minute

View File

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