diff --git a/tools/deploy.sh b/tools/deploy.sh index 0efe51ab45..06cbcc57c5 100755 --- a/tools/deploy.sh +++ b/tools/deploy.sh @@ -127,7 +127,7 @@ mkdir -p "${IRONIC_AUTH_DIR}" if [[ "${DEPLOY_BASIC_AUTH}" == "true" ]]; then if [ -z "${IRONIC_USERNAME:-}" ]; then if [ ! -f "${IRONIC_AUTH_DIR}ironic-username" ]; then - IRONIC_USERNAME="$(tr -dc 'a-zA-Z0-9' < /dev/urandom | fold -w 12 | head -n 1)" + IRONIC_USERNAME="$(uuidgen)" echo "$IRONIC_USERNAME" > "${IRONIC_AUTH_DIR}ironic-username" else IRONIC_USERNAME="$(cat "${IRONIC_AUTH_DIR}ironic-username")" @@ -135,7 +135,7 @@ if [[ "${DEPLOY_BASIC_AUTH}" == "true" ]]; then fi if [ -z "${IRONIC_PASSWORD:-}" ]; then if [ ! -f "${IRONIC_AUTH_DIR}ironic-password" ]; then - IRONIC_PASSWORD="$(tr -dc 'a-zA-Z0-9' < /dev/urandom | fold -w 12 | head -n 1)" + IRONIC_PASSWORD="$(uuidgen)" echo "$IRONIC_PASSWORD" > "${IRONIC_AUTH_DIR}ironic-password" else IRONIC_PASSWORD="$(cat "${IRONIC_AUTH_DIR}ironic-password")"