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:
parent
ece14bbfb0
commit
89529d8dbd
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user