diff --git a/tools/heat-keystone-service b/tools/heat-keystone-service index 24075387a7..53319a0ed2 100755 --- a/tools/heat-keystone-service +++ b/tools/heat-keystone-service @@ -22,7 +22,7 @@ if [[ -z "$SERVICE_TOKEN" ]]; then exit 1 fi -ADMIN_ROLE=$(keystone role-list | awk -F\| '($3 ~ "^ admin *$") { print $2 }') +ADMIN_ROLE=$(keystone role-list | grep '\badmin\b' | awk '{ print $2 }') SERVICE_TENANT=$(keystone tenant-list | grep service | cut -d\| -f2) SERVICE_PASSWORD=${SERVICE_PASSWORD:-$OS_PASSWORD} if [[ "$SERVICE_PASSWORD" == "$OS_PASSWORD" ]]; then