1 # == Class: neutron::keystone::auth
3 # Configures Neutron user, service and endpoint in Keystone.
8 # (required) Password for Neutron user.
11 # Username for Neutron service. Defaults to 'neutron'.
14 # Email for Neutron user. Defaults to 'neutron@localhost'.
17 # Tenant for Neutron user. Defaults to 'services'.
19 # [*configure_endpoint*]
20 # Should Neutron endpoint be configured? Defaults to 'true'.
23 # Should the Neutron service user be configured? Defaults to 'true'.
25 # [*configure_user_role*]
26 # Should the admin role be configured for the service user?
30 # Name of the service. Defaults to the value of auth_name.
33 # Type of service. Defaults to 'network'.
36 # Protocol for public endpoint. Defaults to 'http'.
39 # Public address for endpoint. Defaults to '127.0.0.1'.
42 # Protocol for admin endpoint. Defaults to 'http'.
45 # Admin address for endpoint. Defaults to '127.0.0.1'.
47 # [*internal_protocol*]
48 # Protocol for internal endpoint. Defaults to 'http'.
50 # [*internal_address*]
51 # Internal address for endpoint. Defaults to '127.0.0.1'.
54 # Port for endpoint. Defaults to '9696'.
57 # Port for public endpoint. Defaults to $port.
60 # Region for endpoint. Defaults to 'RegionOne'.
62 class neutron::keystone::auth (
64 $auth_name = 'neutron',
65 $email = 'neutron@localhost',
67 $configure_endpoint = true,
68 $configure_user = true,
69 $configure_user_role = true,
70 $service_name = undef,
71 $service_type = 'network',
72 $public_protocol = 'http',
73 $public_address = '127.0.0.1',
74 $admin_protocol = 'http',
75 $admin_address = '127.0.0.1',
76 $internal_protocol = 'http',
77 $internal_address = '127.0.0.1',
83 if $service_name == undef {
84 $real_service_name = $auth_name
86 $real_service_name = $service_name
90 $real_public_port = $port
92 $real_public_port = $public_port
95 Keystone_endpoint["${region}/${real_service_name}"] ~> Service <| name == 'neutron-server' |>
98 keystone_user { $auth_name:
100 password => $password,
106 if $configure_user_role {
107 Keystone_user_role["${auth_name}@${tenant}"] ~> Service <| name == 'neutron-server' |>
109 keystone_user_role { "${auth_name}@${tenant}":
115 keystone_service { $real_service_name:
117 type => $service_type,
118 description => 'Neutron Networking Service',
121 if $configure_endpoint {
122 keystone_endpoint { "${region}/${real_service_name}":
124 public_url => "${public_protocol}://${public_address}:${real_public_port}/",
125 internal_url => "${internal_protocol}://${internal_address}:${port}/",
126 admin_url => "${admin_protocol}://${admin_address}:${port}/",