aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/postgresql/manifests/init.pp25
1 files changed, 17 insertions, 8 deletions
diff --git a/modules/postgresql/manifests/init.pp b/modules/postgresql/manifests/init.pp
index 4894c348..9b01a407 100644
--- a/modules/postgresql/manifests/init.pp
+++ b/modules/postgresql/manifests/init.pp
@@ -87,6 +87,7 @@ class postgresql {
# server
Postgresql::User <<| tag == $name |>>
Postgresql::Database <<| tag == $name |>>
+ Postgresql::Db_and_user <<| tag == $name |>>
}
@@ -94,14 +95,10 @@ class postgresql {
$tag = "default",
$password ) {
- remote_database { $name:
- description => $description,
- user => $name,
- tag => $tag,
- }
-
- remote_user { $name:
- password => $password
+ @@postgresql::db_and_user { $name:
+ tag => $tag,
+ description => $description,
+ password => $password
}
}
@@ -126,6 +123,18 @@ class postgresql {
}
}
+ define db_and_user($description = "",
+ $password ) {
+
+ database { $name:
+ description => $description,
+ user => $name,
+ }
+
+ user { $name:
+ password => $password
+ }
+ }
# TODO convert it to a regular type ( so we can later change user and so on )
define database($description="", $user="postgres") {