From 253531f623ede2527636954a7bb34854571b8e73 Mon Sep 17 00:00:00 2001 From: Alexandre Iooss Date: Wed, 1 Apr 2020 09:46:02 +0200 Subject: [PATCH] [rsync-mirror] Do not send mail on success --- roles/rsync-mirror/tasks/main.yml | 2 +- roles/rsync-mirror/templates/rsync-mirror-cron.j2 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 %}