Modularize sanitization cronjobs
This commit is contained in:
parent
6b218b02f9
commit
9b64cf8a00
@ -73,12 +73,15 @@
|
|||||||
hour: 3
|
hour: 3
|
||||||
job: 'find /data/syncthing/data/ -type f -iname "*:Zone.Identifier" -delete'
|
job: 'find /data/syncthing/data/ -type f -iname "*:Zone.Identifier" -delete'
|
||||||
tags: [ cron ]
|
tags: [ cron ]
|
||||||
- name: assure sanitize cronjob
|
- name: assure filename sanitize cronjobs
|
||||||
cron:
|
cron:
|
||||||
name: sanitize name=orig.png
|
name: "sanitize {{ item }}"
|
||||||
minute: 0
|
minute: 0
|
||||||
hour: 4
|
hour: 4
|
||||||
job: 'find /data/syncthing/data/ -type f -iname "*?name=orig.png" | while read line; do mv "$line" "${line%?name=orig.png}"; done'
|
job: 'find /data/syncthing/data/ -type f -iname "*{{ item }}" | while read line; do mv "$line" "${line%{{ item }}}"; done'
|
||||||
|
with_items:
|
||||||
|
- ?name=orig.png
|
||||||
|
- ?name=orig.jpeg
|
||||||
tags: [ cron ]
|
tags: [ cron ]
|
||||||
roles:
|
roles:
|
||||||
- role: backup
|
- role: backup
|
||||||
|
Loading…
Reference in New Issue
Block a user