diff --git a/ansible/roles/heat/tasks/bootstrap.yml b/ansible/roles/heat/tasks/bootstrap.yml index b43b4dccb4..55ca525a1f 100644 --- a/ansible/roles/heat/tasks/bootstrap.yml +++ b/ansible/roles/heat/tasks/bootstrap.yml @@ -22,9 +22,9 @@ host='%' priv='{{ heat_database_name }}.*:ALL' append_privs='yes'" - register: database_user - changed_when: "{{ database.stdout.find('localhost | SUCCESS => ') != -1 and (database_user.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}" - failed_when: database_user.stdout.split()[2] != 'SUCCESS' + register: database_user_create + changed_when: "{{ database.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 - name: Starting Heat bootstrap container