]> git.donarmstrong.com Git - dsa-puppet.git/blob - 3rdparty/modules/keystone/manifests/endpoint.pp
try with modules from master
[dsa-puppet.git] / 3rdparty / modules / keystone / manifests / endpoint.pp
1 # == Class: keystone::endpoint
2 #
3 # Creates the auth endpoints for keystone
4 #
5 # === Parameters
6 #
7 # [*public_url*]
8 #   (optional) Public url for keystone endpoint. (Defaults to 'http://127.0.0.1:5000')
9 #   This url should *not* contain any version or trailing '/'.
10 #
11 # [*internal_url*]
12 #   (optional) Internal url for keystone endpoint. (Defaults to $public_url)
13 #   This url should *not* contain any version or trailing '/'.
14 #
15 # [*admin_url*]
16 #   (optional) Admin url for keystone endpoint. (Defaults to 'http://127.0.0.1:35357')
17 #   This url should *not* contain any version or trailing '/'.
18 #
19 # [*region*]
20 #   (optional) Region for endpoint. (Defaults to 'RegionOne')
21 #
22 # [*version*]
23 #   (optional) API version for endpoint. Appended to all endpoint urls. (Defaults to 'v2.0')
24 #
25 # === Examples
26 #
27 #  class { 'keystone::endpoint':
28 #    public_url   => 'https://154.10.10.23:5000',
29 #    internal_url => 'https://11.0.1.7:5000',
30 #    admin_url    => 'https://10.0.1.7:35357',
31 #  }
32 #
33 class keystone::endpoint (
34   $public_url        = 'http://127.0.0.1:5000',
35   $internal_url      = undef,
36   $admin_url         = 'http://127.0.0.1:35357',
37   $version           = 'v2.0',
38   $region            = 'RegionOne',
39 ) {
40
41   $public_url_real = "${public_url}/${version}"
42   $admin_url_real = "${admin_url}/${version}"
43
44   if $internal_url {
45     $internal_url_real = "${internal_url}/${version}"
46   } else {
47     $internal_url_real = "${public_url}/${version}"
48   }
49
50   keystone::resource::service_identity { 'keystone':
51     configure_user      => false,
52     configure_user_role => false,
53     service_type        => 'identity',
54     service_description => 'OpenStack Identity Service',
55     public_url          => $public_url_real,
56     admin_url           => $admin_url_real,
57     internal_url        => $internal_url_real,
58     region              => $region,
59   }
60
61 }