Genericize that cronjob syntax for future endeavors

This commit is contained in:
Salt 2021-12-15 20:53:58 -06:00
parent 640e2e0efe
commit 58196e3f24

View File

@ -42,9 +42,18 @@
with_items:
- app/syncthing.yml
tags: [ always ]
# This works around a bug in my Android app lol
- name: assure husky test sync cronjob
cron: name="husky sync" minute=0 hour="*" job="pgrep rsync || rsync -avHS /data/syncthing/data/Pictures/Husky\ Test/ /data/syncthing/data/Pictures/Unsorted/Husky/"
- name: assure movement cronjobs
cron:
name: "{{ item.name }}"
minute: 0
hour: "*"
job: "pgrep rsync || rsync -avHS --remove-source-files '/data/syncthing/data/{{ item.src }}/' '/data/syncthing/data/{{ item.dest }}/' && rmdir '/data/syncthing/data/{{ item.src }}' "
with_items:
# This works around a bug in my Android app lol
- name: husky test workaround
src: Pictures/Husky Test
dest: Pictures/Unsorted/Husky
tags: [ cron ]
roles:
- role: backup
vars: