diff --git a/manifests/keystone/auth.pp b/manifests/keystone/auth.pp index 6c00afe..3d3fe2c 100644 --- a/manifests/keystone/auth.pp +++ b/manifests/keystone/auth.pp @@ -43,7 +43,7 @@ # # [*service_name*] # (optional) Name of the service. -# Defaults to the value of auth_name. +# Defaults to 'zaqar' # # [*configure_service*] # Should zaqar service be configured? Defaults to 'true'. @@ -60,7 +60,7 @@ class zaqar::keystone::auth( $password, $email = 'zaqar@localhost', $auth_name = 'zaqar', - $service_name = undef, + $service_name = 'zaqar', $service_type = 'messaging', $public_url = 'http://127.0.0.1:8888', $admin_url = 'http://127.0.0.1:8888', @@ -76,19 +76,14 @@ class zaqar::keystone::auth( validate_string($password) - if $service_name == undef { - $real_service_name = $auth_name - } else { - $real_service_name = $service_name - } - - keystone::resource::service_identity { $auth_name: + keystone::resource::service_identity { 'zaqar': configure_user => $configure_user, configure_user_role => $configure_user_role, configure_endpoint => $configure_endpoint, service_type => $service_type, service_description => $service_description, - service_name => $real_service_name, + service_name => $service_name, + auth_name => $auth_name, region => $region, password => $password, email => $email, diff --git a/releasenotes/notes/keystone-auth-name-a147ec123b16221d.yaml b/releasenotes/notes/keystone-auth-name-a147ec123b16221d.yaml new file mode 100644 index 0000000..835c883 --- /dev/null +++ b/releasenotes/notes/keystone-auth-name-a147ec123b16221d.yaml @@ -0,0 +1,5 @@ +--- +fixes: + - The keystone auth class has been updated to provide a default service_name + to allow a user to specify a custom auth_name that may not contain the + name of the service. diff --git a/spec/classes/zaqar_keystone_auth_spec.rb b/spec/classes/zaqar_keystone_auth_spec.rb index 24c3cd7..7a53e94 100644 --- a/spec/classes/zaqar_keystone_auth_spec.rb +++ b/spec/classes/zaqar_keystone_auth_spec.rb @@ -62,8 +62,8 @@ describe 'zaqar::keystone::auth' do it { is_expected.to contain_keystone_user('zaqary') } it { is_expected.to contain_keystone_user_role('zaqary@services') } - it { is_expected.to contain_keystone_service('zaqary::messaging') } - it { is_expected.to contain_keystone_endpoint('RegionOne/zaqary::messaging') } + it { is_expected.to contain_keystone_service('zaqar::messaging') } + it { is_expected.to contain_keystone_endpoint('RegionOne/zaqar::messaging') } end describe 'when overriding service name' do