Make heat-keystone-service a tad more robust

The ADMIN_ROLE extraction failed when the column with the role names was
centered instead of left-aligned.

Change-Id: If39292b65dfce5fa820396e49e72fc635c2cb0c2
This commit is contained in:
Tomas Sedovic 2012-06-08 11:24:04 +02:00
parent 23305fb9fc
commit 834c13e4ab

View File

@ -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