reprepro: fix cron config path and randomise times better
The config should use the full path to the config directory, append /etc/reprepro to the job. Currently all the reprepro jobs hash to the same start time because it uses the hostname as a seed. Use the unique string name as the seed so each job starts at a unique time. Change-Id: If2745d0cd274f390dbff6337b7a44093b5919908
This commit is contained in:
parent
3d3f1def31
commit
3ddbba92ae
@ -2,6 +2,6 @@
|
|||||||
cron:
|
cron:
|
||||||
name: '{{ _string_name }} reprepro mirror sync'
|
name: '{{ _string_name }} reprepro mirror sync'
|
||||||
state: present
|
state: present
|
||||||
job: 'flock -n /var/run/reprepro/{{ _dir }}.lock reprepro-mirror-update {{ _dir }} {{ _volume }} >> /var/log/reprepro/{{ _dir }}.log 2>&1'
|
job: 'flock -n /var/run/reprepro/{{ _dir }}.lock reprepro-mirror-update /etc/reprepro/{{ _dir }} {{ _volume }} >> /var/log/reprepro/{{ _dir }}.log 2>&1'
|
||||||
hour: '*/2'
|
hour: '*/2'
|
||||||
minute: '{{ 45 | random(seed=inventory_hostname) }}'
|
minute: '{{ 45 | random(seed=_string_name) }}'
|
||||||
|
Loading…
Reference in New Issue
Block a user