diff --git a/roles/rsync-mirror/tasks/main.yml b/roles/rsync-mirror/tasks/main.yml index 3900dd59..75c8cb06 100644 --- a/roles/rsync-mirror/tasks/main.yml +++ b/roles/rsync-mirror/tasks/main.yml @@ -6,7 +6,7 @@ home: /var/mirror # unused, should be something empty shell: /bin/false -- name: Configure ftpsync cron +- name: Configure rsync cron template: src: rsync-mirror-cron.j2 dest: /etc/cron.d/rsync-mirror diff --git a/roles/rsync-mirror/templates/rsync-mirror-cron.j2 b/roles/rsync-mirror/templates/rsync-mirror-cron.j2 index 427ec897..039b6422 100644 --- a/roles/rsync-mirror/templates/rsync-mirror-cron.j2 +++ b/roles/rsync-mirror/templates/rsync-mirror-cron.j2 @@ -1,4 +1,4 @@ # {{ ansible_managed }} {% for i in rsync_mirror %} -{{ i.cron_time }} * * * mirror rsync --times --links --hard-links --partial --block-size=8192 --recursive --exclude *-dvd-* --exclude source/ --verbose --stats --delete-after rsync://{{ i.rsync_host }}/{{ i.rsync_path }} {{ i.dest }} | tee -a "/var/log/mirror/{{ i.name }}.log" +{{ i.cron_time }} * * * mirror rsync --times --links --hard-links --partial --block-size=8192 --recursive --exclude *-dvd-* --exclude source/ --verbose --stats --delete-after rsync://{{ i.rsync_host }}/{{ i.rsync_path }} {{ i.dest }} | tee -a "/var/log/mirror/{{ i.name }}.log" > /dev/null {% endfor %}