From f2d32d2e0134030a3a9f40fb8ec769b1ae71e199 Mon Sep 17 00:00:00 2001 From: Zhuo Zhen Date: Wed, 20 Nov 2019 08:55:27 -0600 Subject: [PATCH] Fix hard-coded admin project name and username in blazar task In one of the blazar ansible tasks in "bootstrap.yml", the admin project name and username are hard-coded as "admin". OpenStack users can define their admin project name and username differently and the hard-coded names would cause authentication errors. In addition, keystone identity api version 3 uses "os-project-name" instead of "os-tenant-name". Although "os-tenant-name" might be still accepatable, it's better to keep the latest. Change-Id: Ie5c1016f9ce6f402ef208f3c295e6883a9edd8ab Closes-bug: #1853462 --- ansible/roles/blazar/tasks/bootstrap.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ansible/roles/blazar/tasks/bootstrap.yml b/ansible/roles/blazar/tasks/bootstrap.yml index b3dd1a3296..acb7880b5f 100644 --- a/ansible/roles/blazar/tasks/bootstrap.yml +++ b/ansible/roles/blazar/tasks/bootstrap.yml @@ -40,13 +40,13 @@ command: > docker exec kolla_toolbox openstack --os-interface internal - --os-auth-url {{ keystone_admin_url }} + --os-auth-url {{ openstack_auth.auth_url }} --os-identity-api-version 3 - --os-project-domain-name default - --os-tenant-name admin - --os-username admin - --os-password {{ keystone_admin_password }} - --os-user-domain-name default + --os-project-domain-name {{ openstack_auth.domain_name }} + --os-project-name {{ openstack_auth.project_name }} + --os-username {{ openstack_auth.username }} + --os-password {{ openstack_auth.password }} + --os-user-domain-name {{ openstack_auth.user_domain_name }} --os-region-name {{ openstack_region_name }} {% if openstack_cacert != '' %}--os-cacert {{ openstack_cacert }}{% endif %} aggregate create {{ blazar_aggregate_pool_name }}