ansible/roles/rsync-mirror/templates/rsync-mirror-cron.j2

5 lines
492 B
Django/Jinja

{{ ansible_header | comment }}
{% for i in rsync_mirror.targets %}
{{ i.cron_time }} * * * mirror rsync --times --links --hard-links --partial --block-size=8192 --recursive --exclude *-dvd-* --exclude *.raw --exclude source/ --verbose --stats --delete-after {%for exclude in i.exclude | default([]) %}--exclude {{ exclude }} {% endfor %}rsync://{{ i.rsync_host }}/{{ i.rsync_path }} {{ rsync_mirror.root }}/{{ i.dest }} | tee -a "/var/log/mirror/{{ i.name }}.log" > /dev/null
{% endfor %}