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: I482621899616f6e3dc902900b0933ffa58ca519a
This commit is contained in:
parent
2079fb1ff5
commit
7775352fcd
@ -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 'barbican'
|
# Defaults to 'barbican'
|
||||||
#
|
#
|
||||||
# [*password*]
|
|
||||||
# (Optional) 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'
|
||||||
@ -196,7 +195,7 @@
|
|||||||
# authtoken class. Values set here override the individual parameters above.
|
# authtoken class. Values set here override the individual parameters above.
|
||||||
#
|
#
|
||||||
class barbican::keystone::authtoken(
|
class barbican::keystone::authtoken(
|
||||||
$password = $facts['os_service_default'],
|
String[1] $password,
|
||||||
$username = 'barbican',
|
$username = 'barbican',
|
||||||
$auth_url = 'http://localhost:5000',
|
$auth_url = 'http://localhost:5000',
|
||||||
$project_name = 'services',
|
$project_name = 'services',
|
||||||
@ -238,10 +237,6 @@ class barbican::keystone::authtoken(
|
|||||||
|
|
||||||
include barbican::deps
|
include barbican::deps
|
||||||
|
|
||||||
if is_service_default($password) {
|
|
||||||
fail('Please set password for barbican service user')
|
|
||||||
}
|
|
||||||
|
|
||||||
keystone::resource::authtoken {
|
keystone::resource::authtoken {
|
||||||
'barbican_config':
|
'barbican_config':
|
||||||
* => $params;
|
* => $params;
|
||||||
|
Loading…
Reference in New Issue
Block a user