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:
Takashi Kajinami 2023-07-12 22:01:29 +09:00
parent f42642bd61
commit f1f2036937
1 changed files with 4 additions and 9 deletions

View File

@ -4,14 +4,13 @@
#
# === Parameters
#
# [*password*]
# (Required) Password to create for the service user
#
# [*username*]
# (Optional) The name of the service user
# Defaults to 'magnum'
#
# [*password*]
# (Required) Password to create for the service user
# Defaults to $facts['os_service_default']
#
# [*auth_url*]
# (Optional) The URL to use for authentication.
# Defaults to 'http://localhost:5000'
@ -191,8 +190,8 @@
# Defaults to $facts['os_service_default'].
#
class magnum::keystone::authtoken(
String[1] $password,
$username = 'magnum',
$password = $facts['os_service_default'],
$auth_url = 'http://localhost:5000',
$project_name = 'services',
$user_domain_name = 'Default',
@ -232,10 +231,6 @@ class magnum::keystone::authtoken(
include magnum::deps
if is_service_default($password) {
fail('Please set password for magnum service user')
}
keystone::resource::authtoken { 'magnum_config':
username => $username,
password => $password,