aboutsummaryrefslogtreecommitdiffstats
path: root/modules/postgresql/manifests/db_and_user.pp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/postgresql/manifests/db_and_user.pp')
-rw-r--r--modules/postgresql/manifests/db_and_user.pp15
1 files changed, 15 insertions, 0 deletions
diff --git a/modules/postgresql/manifests/db_and_user.pp b/modules/postgresql/manifests/db_and_user.pp
new file mode 100644
index 00000000..2d59e1ca
--- /dev/null
+++ b/modules/postgresql/manifests/db_and_user.pp
@@ -0,0 +1,15 @@
+define postgresql::db_and_user( $password,
+ $description = '',
+ $callback_notify = '') {
+
+ postgresql::database { $name:
+ callback_notify => $callback_notify,
+ description => $description,
+ user => $name,
+ require => Postgresql::User[$name],
+ }
+
+ postgresql::user { $name:
+ password => $password
+ }
+}