projects
/
mirror
/
dsa-puppet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
try with modules from master
[mirror/dsa-puppet.git]
/
3rdparty
/
modules
/
keystone
/
manifests
/
db
/
postgresql.pp
diff --git
a/3rdparty/modules/keystone/manifests/db/postgresql.pp
b/3rdparty/modules/keystone/manifests/db/postgresql.pp
index
3d7eb73
..
4bf5a6a
100644
(file)
--- a/
3rdparty/modules/keystone/manifests/db/postgresql.pp
+++ b/
3rdparty/modules/keystone/manifests/db/postgresql.pp
@@
-1,47
+1,57
@@
+# == Class: keystone::db::postgresql
#
#
-# implements postgresql backend for keystone
+# Class that configures postgresql for keystone
+# Requires the Puppetlabs postgresql module.
#
#
-# This class can be used to create tables, users and grant
-# privelege for a postgresql keystone database.
-#
-# Requires Puppetlabs Postgresql module.
+# == Authors
#
#
-# [*Parameters*]
+# Stackforge Contributors puppet-openstack@puppetlabs.com
+# Etienne Pelletier epelletier@morphlabs.com
#
#
-# [password] Password that will be used for the keystone db user.
-# Optional. Defaults to: 'keystone_default_password'
+# == Copyright
#
#
-# [dbname] Name of keystone database. Optional. Defaults to keystone.
+# Copyright 2013-2014 Stackforge Contributors
+# Copyright 2012 Etienne Pelletier, unless otherwise noted.
#
#
-#
[user] Name of keystone user. Optional. Defaults to keystone.
+#
=== Parameters
#
#
-#
== Dependencies
-#
Class['postgresql::server']
+#
[*password*]
+#
(Required) Password to connect to the database.
#
#
-# == Examples
-# == Authors
+# [*dbname*]
+# (Optional) Name of the database.
+# Defaults to 'keystone'.
#
#
-# Etienne Pelletier epelletier@morphlabs.com
+# [*user*]
+# (Optional) User to connect to the database.
+# Defaults to 'keystone'.
#
#
-# == Copyright
+# [*encoding*]
+# (Optional) The charset to use for the database.
+# Default to undef.
#
#
-# Copyright 2012 Etienne Pelletier, unless otherwise noted.
+# [*privileges*]
+# (Optional) Privileges given to the database user.
+# Default to 'ALL'
#
class keystone::db::postgresql(
$password,
#
class keystone::db::postgresql(
$password,
- $dbname = 'keystone',
- $user = 'keystone'
+ $dbname = 'keystone',
+ $user = 'keystone',
+ $encoding = undef,
+ $privileges = 'ALL',
) {
Class['keystone::db::postgresql'] -> Service<| title == 'keystone' |>
) {
Class['keystone::db::postgresql'] -> Service<| title == 'keystone' |>
- require postgresql::python
-
- postgresql::db { $dbname:
- user => $user,
- password => $password,
+ ::openstacklib::db::postgresql { 'keystone':
+ password_hash => postgresql_password($user, $password),
+ dbname => $dbname,
+ user => $user,
+ encoding => $encoding,
+ privileges => $privileges,
}
}
-
Postgresql::Db[$dbname
] ~> Exec<| title == 'keystone-manage db_sync' |>
+
::Openstacklib::Db::Postgresql['keystone'
] ~> Exec<| title == 'keystone-manage db_sync' |>
}
}