From 416df9fc39f89e4fe5da22fb1b75fdf4c4563031 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Wed, 12 Jul 2023 22:03:41 +0900 Subject: [PATCH] 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: Ieb74be9b8736113950363862f953ae783a62683f --- manifests/keystone/authtoken.pp | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/manifests/keystone/authtoken.pp b/manifests/keystone/authtoken.pp index 3df06bc30..617548bd4 100644 --- a/manifests/keystone/authtoken.pp +++ b/manifests/keystone/authtoken.pp @@ -4,14 +4,13 @@ # # === Parameters # +# [*password*] +# (Required) Password to create for the service user +# # [*username*] # (Optional) The name of the service user # Defaults to 'neutron' # -# [*password*] -# (Optional) 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'. @@ -196,8 +195,8 @@ # authtoken class. Values set here override the individual parameters above. # class neutron::keystone::authtoken( + String[1] $password, $username = 'neutron', - $password = $facts['os_service_default'], $auth_url = 'http://localhost:5000', $project_name = 'services', $user_domain_name = 'Default', @@ -238,10 +237,6 @@ class neutron::keystone::authtoken( include neutron::deps - if is_service_default($password) { - fail('Please set password for neutron service user') - } - keystone::resource::authtoken { 'neutron_config': * => $params;