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: I38d4f000905ac01ac1cf50bfbc48cb30af609cf7
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 'ironic'
|
# Defaults to 'ironic'
|
||||||
#
|
#
|
||||||
# [*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://127.0.0.1:5000'.
|
# Defaults to 'http://127.0.0.1:5000'.
|
||||||
@@ -197,8 +196,8 @@
|
|||||||
# authtoken class. Values set here override the individual parameters above.
|
# authtoken class. Values set here override the individual parameters above.
|
||||||
#
|
#
|
||||||
class ironic::api::authtoken(
|
class ironic::api::authtoken(
|
||||||
|
String[1] $password,
|
||||||
$username = 'ironic',
|
$username = 'ironic',
|
||||||
$password = $facts['os_service_default'],
|
|
||||||
$auth_url = 'http://127.0.0.1:5000',
|
$auth_url = 'http://127.0.0.1:5000',
|
||||||
$project_name = 'services',
|
$project_name = 'services',
|
||||||
$user_domain_name = 'Default',
|
$user_domain_name = 'Default',
|
||||||
@@ -239,10 +238,6 @@ class ironic::api::authtoken(
|
|||||||
|
|
||||||
include ironic::deps
|
include ironic::deps
|
||||||
|
|
||||||
if is_service_default($password) {
|
|
||||||
fail('Please set password for Ironic API service user')
|
|
||||||
}
|
|
||||||
|
|
||||||
keystone::resource::authtoken {
|
keystone::resource::authtoken {
|
||||||
'ironic_config':
|
'ironic_config':
|
||||||
* => $params;
|
* => $params;
|
||||||
|
@@ -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 'ironic'
|
# Defaults to 'ironic'
|
||||||
#
|
#
|
||||||
# [*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://127.0.0.1:5000'.
|
# Defaults to 'http://127.0.0.1:5000'.
|
||||||
@@ -196,8 +195,8 @@
|
|||||||
# authtoken class. Values set here override the individual parameters above.
|
# authtoken class. Values set here override the individual parameters above.
|
||||||
#
|
#
|
||||||
class ironic::inspector::authtoken(
|
class ironic::inspector::authtoken(
|
||||||
|
String[1] $password,
|
||||||
$username = 'ironic',
|
$username = 'ironic',
|
||||||
$password = $facts['os_service_default'],
|
|
||||||
$auth_url = 'http://127.0.0.1:5000',
|
$auth_url = 'http://127.0.0.1:5000',
|
||||||
$project_name = 'services',
|
$project_name = 'services',
|
||||||
$user_domain_name = 'Default',
|
$user_domain_name = 'Default',
|
||||||
@@ -238,10 +237,6 @@ class ironic::inspector::authtoken(
|
|||||||
|
|
||||||
include ironic::deps
|
include ironic::deps
|
||||||
|
|
||||||
if is_service_default($password) {
|
|
||||||
fail('Please set password for Ironic Inspector service user')
|
|
||||||
}
|
|
||||||
|
|
||||||
keystone::resource::authtoken {
|
keystone::resource::authtoken {
|
||||||
'ironic_inspector_config':
|
'ironic_inspector_config':
|
||||||
* => $params;
|
* => $params;
|
||||||
|
Reference in New Issue
Block a user