authtoken: Make password required
The password parameter is not really optional. This makes it a required parameter to give more sensible validation error. Change-Id: I1019f4616bc0bbbc4c180fbf057da4f71ae4253d
This commit is contained in:
@@ -4,14 +4,13 @@
|
|||||||
#
|
#
|
||||||
# === Parameters
|
# === Parameters
|
||||||
#
|
#
|
||||||
|
# [*password*]
|
||||||
|
# (Required) Password to create for the service user
|
||||||
|
#
|
||||||
# [*username*]
|
# [*username*]
|
||||||
# (Optional) The name of the service user
|
# (Optional) The name of the service user
|
||||||
# Defaults to 'magnum'
|
# Defaults to 'magnum'
|
||||||
#
|
#
|
||||||
# [*password*]
|
|
||||||
# (Required) Password to create for the service user
|
|
||||||
# Defaults to $facts['os_service_default']
|
|
||||||
#
|
|
||||||
# [*auth_url*]
|
# [*auth_url*]
|
||||||
# (Optional) The URL to use for authentication.
|
# (Optional) The URL to use for authentication.
|
||||||
# Defaults to 'http://localhost:5000'
|
# Defaults to 'http://localhost:5000'
|
||||||
@@ -191,8 +190,8 @@
|
|||||||
# Defaults to $facts['os_service_default'].
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
class magnum::keystone::authtoken(
|
class magnum::keystone::authtoken(
|
||||||
|
String[1] $password,
|
||||||
$username = 'magnum',
|
$username = 'magnum',
|
||||||
$password = $facts['os_service_default'],
|
|
||||||
$auth_url = 'http://localhost:5000',
|
$auth_url = 'http://localhost:5000',
|
||||||
$project_name = 'services',
|
$project_name = 'services',
|
||||||
$user_domain_name = 'Default',
|
$user_domain_name = 'Default',
|
||||||
@@ -232,10 +231,6 @@ class magnum::keystone::authtoken(
|
|||||||
|
|
||||||
include magnum::deps
|
include magnum::deps
|
||||||
|
|
||||||
if is_service_default($password) {
|
|
||||||
fail('Please set password for magnum service user')
|
|
||||||
}
|
|
||||||
|
|
||||||
keystone::resource::authtoken { 'magnum_config':
|
keystone::resource::authtoken { 'magnum_config':
|
||||||
username => $username,
|
username => $username,
|
||||||
password => $password,
|
password => $password,
|
||||||
|
Reference in New Issue
Block a user