diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/postgresql/manifests/init.pp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/modules/postgresql/manifests/init.pp b/modules/postgresql/manifests/init.pp index 1afb25f5..a1f39b95 100644 --- a/modules/postgresql/manifests/init.pp +++ b/modules/postgresql/manifests/init.pp @@ -89,6 +89,28 @@ class postgresql { } + define remote_database($description = "", + $user = "postgresql", + $tag = "default") + { + @@postgresql::database { $name: + description => $description, + user => $user, + tag => $tag, + require => Postgresql::User[$user] + } + } + + define remote_user($password, + $tag = "default") + { + @@postgresql::user { $name: + tag => $tag, + password => $password, + } + } + + # TODO convert it to a regular type ( so we can later change user and so on ) define database($description="", $user="postgres") { exec { "createdb -O $user -U postgres $name '$description'": |