diff --git a/roles/mgrote_rsync/defaults/main.yml b/roles/mgrote_rsync/defaults/main.yml index 4ddc852b..f5150765 100644 --- a/roles/mgrote_rsync/defaults/main.yml +++ b/roles/mgrote_rsync/defaults/main.yml @@ -1,6 +1,5 @@ --- -### when should rsync_mirror be run (every 5 minutes) -rsync_mirror_timer: '*-*-* *:00/5' + ### mgrote_rsync_mirror #rsync_mirror_syncoid_datasets_sync: @@ -14,3 +13,5 @@ rsync_mirror_timer: '*-*-* *:00/5' ------ rsync_mirror_user_group: "{{ rsync_mirror_user }}" rsync_mirror_user: rsync_mirror +### when should rsync_mirror be run (every 5 minutes) +rsync_mirror_timer: '*-*-* *:00/5' diff --git a/roles/mgrote_rsync/templates/syncoid.service.j2 b/roles/mgrote_rsync/templates/rsync_mirror.service.j2 similarity index 72% rename from roles/mgrote_rsync/templates/syncoid.service.j2 rename to roles/mgrote_rsync/templates/rsync_mirror.service.j2 index 2a493f57..2970ccd6 100644 --- a/roles/mgrote_rsync/templates/syncoid.service.j2 +++ b/roles/mgrote_rsync/templates/rsync_mirror.service.j2 @@ -1,7 +1,7 @@ {{ file_header | default () }} [Unit] -Description=Send zfs snapshots with rsync_mirror/rsync_mirror. +Description=Mirror data with rsync. OnFailure=rsync_mirror_mail.service OnSuccess=rsync_mirror_mail.service diff --git a/roles/mgrote_rsync/templates/syncoid.timer.j2 b/roles/mgrote_rsync/templates/rsync_mirror.timer.j2 similarity index 74% rename from roles/mgrote_rsync/templates/syncoid.timer.j2 rename to roles/mgrote_rsync/templates/rsync_mirror.timer.j2 index 95589e09..4b187cbf 100644 --- a/roles/mgrote_rsync/templates/syncoid.timer.j2 +++ b/roles/mgrote_rsync/templates/rsync_mirror.timer.j2 @@ -3,7 +3,7 @@ Description=Timer for rsync_mirror. [Timer] -OnCalendar={{ rsync_mirror_rsync_mirror_timer }} +OnCalendar={{ rsync_mirror_timer }} [Install] WantedBy=timers.target multi-user.target zfs.target diff --git a/roles/mgrote_rsync/templates/syncoid_mail.service.j2 b/roles/mgrote_rsync/templates/rsync_mirror_mail.service.j2 similarity index 50% rename from roles/mgrote_rsync/templates/syncoid_mail.service.j2 rename to roles/mgrote_rsync/templates/rsync_mirror_mail.service.j2 index 812eadef..1fa41ec5 100644 --- a/roles/mgrote_rsync/templates/syncoid_mail.service.j2 +++ b/roles/mgrote_rsync/templates/rsync_mirror_mail.service.j2 @@ -5,4 +5,4 @@ Description=Send a Mail for rsync_mirror service after error or success rsync_mi [Service] Type=oneshot -ExecStart=/bin/bash -c '/usr/bin/journalctl -u syncoid.service -n 30 | mail -aFROM:syncoid@mgrote.net -s "syncoid - %H" {{ my_mail }}' +ExecStart=/bin/bash -c '/usr/bin/journalctl -u rsync_mirror.service -n 30 | mail -aFROM:{{ rsync_mirror_user }}@mgrote.net -s "syncoid - %H" {{ my_mail }}'