From 802dfce4a854ef6f30827a2223c0ca7a73226f7a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rados=C5=82aw=20Piliszek?= <radoslaw.piliszek@gmail.com>
Date: Sun, 16 Jun 2019 10:39:32 +0200
Subject: [PATCH] Make cron jobs generator command task in keystone
 non-changing
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

The task does not change any state but is used to set a fact
from parsed output.

Also adjust task name.

Change-Id: I5fe322546d82a373522645485be18fe7bfc57999
Signed-off-by: Radosław Piliszek <radoslaw.piliszek@gmail.com>
---
 ansible/roles/keystone/tasks/config.yml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ansible/roles/keystone/tasks/config.yml b/ansible/roles/keystone/tasks/config.yml
index c1f6b3642c..ad3fb6dc8f 100644
--- a/ansible/roles/keystone/tasks/config.yml
+++ b/ansible/roles/keystone/tasks/config.yml
@@ -187,11 +187,12 @@
     -t {{ (fernet_key_rotation_interval | int) // 60 }}
     -i {{ groups['keystone'].index(inventory_hostname) }}
     -n {{ (groups['keystone'] | length) }}
+  changed_when: false
   register: cron_jobs_json
   when: keystone_token_provider == 'fernet'
   delegate_to: localhost
 
-- name: Save the returned from cron jobs for building the crontab
+- name: Set fact with the generated cron jobs for building the crontab later
   set_fact:
     cron_jobs: "{{ (cron_jobs_json.stdout | from_json).cron_jobs }}"
   ignore_errors: "{{ ansible_check_mode }}"