/usr/share/puppet/modules.available/keystone/manifests/endpoint.pp is in puppet-module-keystone 9.4.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 | # == Class: keystone::endpoint
#
# Creates the auth endpoints for keystone
#
# === Parameters
#
# [*public_url*]
# (optional) Public url for keystone endpoint.
# Defaults to 'http://127.0.0.1:5000'
# This url should *not* contain any version or trailing '/'.
#
# [*internal_url*]
# (optional) Internal url for keystone endpoint.
# Defaults to $public_url
# This url should *not* contain any version or trailing '/'.
#
# [*admin_url*]
# (optional) Admin url for keystone endpoint.
# Defaults to 'http://127.0.0.1:35357'
# This url should *not* contain any version or trailing '/'.
#
# [*region*]
# (optional) Region for endpoint. (Defaults to 'RegionOne')
#
# [*user_domain*]
# (Optional) Domain for $auth_name
# Defaults to undef (use the keystone server default domain)
#
# [*project_domain*]
# (Optional) Domain for $tenant (project)
# Defaults to undef (use the keystone server default domain)
#
# [*default_domain*]
# (Optional) Domain for $auth_name and $tenant (project)
# If keystone_user_domain is not specified, use $keystone_default_domain
# If keystone_project_domain is not specified, use $keystone_default_domain
# Defaults to undef
#
# [*version*]
# (optional) API version for endpoint.
# Defaults to 'v2.0'. Valid values are 'v2.0', 'v3', or the empty string ''.
# If the version is set to the empty string (''), then it won't be
# used. This is the expected behaviour since Keystone V3 handles API versions
# from the context.
#
# === Examples
#
# class { 'keystone::endpoint':
# public_url => 'https://154.10.10.23:5000',
# internal_url => 'https://11.0.1.7:5000',
# admin_url => 'https://10.0.1.7:35357',
# }
#
class keystone::endpoint (
$public_url = 'http://127.0.0.1:5000',
$internal_url = undef,
$admin_url = 'http://127.0.0.1:35357',
$region = 'RegionOne',
$user_domain = undef,
$project_domain = undef,
$default_domain = undef,
$version = 'unset', # defaults to 'v2.0' if unset by user
) {
include ::keystone::deps
if $version == 'unset' {
# $version will be set to empty '' once tempest & all openstack clients
# actually support versionless endpoints.
# See ongoing work in Tempest:
# https://review.openstack.org/#/q/status:open+project:openstack/tempest-lib+branch:master+topic:bug/1530181
# Until that, we need to set a version by default.
$_version = 'v2.0'
} else {
$_version = $version
}
if empty($_version) {
$admin_url_real = $admin_url
$public_url_real = $public_url
if $internal_url {
$internal_url_real = $internal_url
}
else {
$internal_url_real = $public_url
}
}
else {
$public_url_real = "${public_url}/${_version}"
$admin_url_real = "${admin_url}/${_version}"
if $internal_url {
$internal_url_real = "${internal_url}/${_version}"
}
else {
$internal_url_real = "${public_url}/${_version}"
}
}
keystone::resource::service_identity { 'keystone':
configure_user => false,
configure_user_role => false,
service_type => 'identity',
service_description => 'OpenStack Identity Service',
public_url => $public_url_real,
admin_url => $admin_url_real,
internal_url => $internal_url_real,
region => $region,
user_domain => $user_domain,
project_domain => $project_domain,
default_domain => $default_domain,
}
Keystone::Resource::Service_identity['keystone'] -> File<| tag == 'openrc' |>
}
|