Browse Source

Make glance cache management cron task idempotent

Use a seed in the glance cache management cron task's random
filter so that each host's results are idempotent when re-running.
This prevents the constant changing of the crontab whenever the
playbook is run.

Change-Id: Ia14e867347aeadc6c55cef49f9f2ae0e6f86412f
Jimmy McCrory 6 months ago
parent
commit
2bb196613d
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      tasks/glance_post_install.yml

+ 1
- 1
tasks/glance_post_install.yml View File

@@ -109,7 +109,7 @@
109 109
 - name: Create glance cache management cron jobs
110 110
   cron:
111 111
     name: "{{ item.name }}"
112
-    minute: "{{ 59 |random(start=1) }}"
112
+    minute: "{{ 59 | random(seed=inventory_hostname, start=1) }}"
113 113
     day: "*"
114 114
     hour: "{{ item.hour }}"
115 115
     month: "*"

Loading…
Cancel
Save