From 97a8ba6fd7f0f59aa392573ba9d7107d92f2880d Mon Sep 17 00:00:00 2001 From: Sam Yaple Date: Mon, 23 Nov 2015 17:37:04 +0000 Subject: [PATCH] Fix incorrect ansible variable Change-Id: Ic6755dfe5c3741e4a945c8353f643bbf1479c172 Closes-Bug: #1519040 --- ansible/roles/keystone/tasks/bootstrap.yml | 2 +- ansible/roles/magnum/tasks/bootstrap.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible/roles/keystone/tasks/bootstrap.yml b/ansible/roles/keystone/tasks/bootstrap.yml index 37210875d0..937939cce0 100644 --- a/ansible/roles/keystone/tasks/bootstrap.yml +++ b/ansible/roles/keystone/tasks/bootstrap.yml @@ -31,7 +31,7 @@ priv='{{ keystone_database_name }}.*:ALL' append_privs='yes'" register: database_user_create - changed_when: "{{ database.stdout.find('localhost | SUCCESS => ') != -1 and + changed_when: "{{ database_user_create.stdout.find('localhost | SUCCESS => ') != -1 and (database_user_create.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}" failed_when: database_user_create.stdout.split()[2] != 'SUCCESS' run_once: True diff --git a/ansible/roles/magnum/tasks/bootstrap.yml b/ansible/roles/magnum/tasks/bootstrap.yml index 48b9267d08..fda2352c59 100644 --- a/ansible/roles/magnum/tasks/bootstrap.yml +++ b/ansible/roles/magnum/tasks/bootstrap.yml @@ -29,7 +29,7 @@ priv='{{ magnum_database_name }}.*:ALL' append_privs='yes'" register: database_user_create - changed_when: "{{ database.stdout.find('localhost | SUCCESS => ') != -1 and + changed_when: "{{ database_user_create.stdout.find('localhost | SUCCESS => ') != -1 and (database_user_create.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}" failed_when: database_user_create.stdout.split()[2] != 'SUCCESS' run_once: True