From 2182e5631e516611f75072238693b7655b82faf7 Mon Sep 17 00:00:00 2001 From: Noboru Iwamatsu Date: Thu, 6 Jul 2017 15:24:52 +0900 Subject: [PATCH] delete delimiter from init fernet condition check In ansible 2.3.1, conditional statement should not include jinja2 templating delimiters (e.g. {{ ). So, this change removes the delimiters from when statemant, and also removes unnesessary parentheses from until statement. Closes-Bug: 1702607 Change-Id: I071ffd5ba6175ee1bc61719a84b805c022753459 --- ansible/roles/keystone/tasks/init_fernet.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible/roles/keystone/tasks/init_fernet.yml b/ansible/roles/keystone/tasks/init_fernet.yml index c608202ab7..a6596da3f0 100644 --- a/ansible/roles/keystone/tasks/init_fernet.yml +++ b/ansible/roles/keystone/tasks/init_fernet.yml @@ -2,8 +2,8 @@ - name: Initialise fernet key authentication command: "docker exec -t keystone_fernet kolla_keystone_bootstrap {{ keystone_username }} {{ keystone_groupname }}" register: fernet_create - changed_when: "{{ fernet_create.stdout.find('localhost | SUCCESS => ') != -1 and (fernet_create.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}" - until: "(fernet_create.stdout.split()[2] == 'SUCCESS') or (fernet_create.stdout.find('Key repository is already initialized') != -1)" + changed_when: fernet_create.stdout.find('localhost | SUCCESS => ') != -1 and (fernet_create.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed + until: fernet_create.stdout.split()[2] == 'SUCCESS' or fernet_create.stdout.find('Key repository is already initialized') != -1 retries: 10 delay: 5 run_once: True