From 2bb196613dd45d23ae7a067ec98f2867d631a5e6 Mon Sep 17 00:00:00 2001 From: Jimmy McCrory Date: Sat, 20 Oct 2018 13:50:11 -0700 Subject: [PATCH] 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 --- tasks/glance_post_install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/glance_post_install.yml b/tasks/glance_post_install.yml index e2530d46..cb137d34 100644 --- a/tasks/glance_post_install.yml +++ b/tasks/glance_post_install.yml @@ -109,7 +109,7 @@ - name: Create glance cache management cron jobs cron: name: "{{ item.name }}" - minute: "{{ 59 |random(start=1) }}" + minute: "{{ 59 | random(seed=inventory_hostname, start=1) }}" day: "*" hour: "{{ item.hour }}" month: "*"