From 8c8e296ecf7d6259cd29a5aaefb8d03ba5d8c05a Mon Sep 17 00:00:00 2001 From: Tomoya Goto Date: Mon, 24 Oct 2016 15:48:37 +0900 Subject: [PATCH] Fix fernet related components added to fact var properly. Previous version of keystone reconfigure fails at adding fernet components to fact variable "keystone_item". Ansible can not create fact variable using newly created variable in a same task. This patch set split this task into two tasks, first create variable containing fernet components, then merge it to "keystone_item". Change-Id: I15571ab20d6104d30350e8b922401b462336fca0 Closes-Bug: #1636047 --- ansible/roles/keystone/tasks/reconfigure.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ansible/roles/keystone/tasks/reconfigure.yml b/ansible/roles/keystone/tasks/reconfigure.yml index 7cfeded612..6ef22ad9ff 100644 --- a/ansible/roles/keystone/tasks/reconfigure.yml +++ b/ansible/roles/keystone/tasks/reconfigure.yml @@ -4,11 +4,15 @@ keystone_items: - { name: keystone, group: keystone } -- name: Add fernet related components to variable if fernet is enabled +- name: Create fernet related components for variable if fernet is enabled set_fact: keystone_fernet_items: - { name: keystone_fernet, group: keystone } - { name: keystone_ssh, group: keystone } + when: keystone_token_provider == 'fernet' + +- name: Merge fernet related components to variable if fernet is enabled + set_fact: keystone_items: "{{ keystone_items + keystone_fernet_items }}" when: keystone_token_provider == 'fernet'