mirror-update: seed cron time with unique job name

Currently we start all jobs at the same time, which was not the
intent.  Switch this to seed on the unique name of the job, which
should space jobs out randomly.

Change-Id: Ib41d8ca10aefe4a29bdd02935de8a588ab881958
This commit is contained in:
Ian Wienand 2019-07-03 11:36:43 +10:00
parent ece14bbfb0
commit 89529d8dbd

View File

@ -45,7 +45,7 @@
state: present
job: 'flock -n /var/run/{{ item }}-mirror.lock {{ item }}-mirror-update mirror.{{ item }} >> /var/log/rsync-mirrors/{{ item }}.log 2>&1'
hour: '*/2'
minute: '{{ 45 | random(seed=inventory_hostname) }}'
minute: '{{ 45 | random(seed=item) }}'
loop: '{{ rsync_update_scripts }}'
- name: Install logrotate rules