diff options
author | Michael Scherer <misc@mageia.org> | 2011-03-08 11:54:34 +0000 |
---|---|---|
committer | Michael Scherer <misc@mageia.org> | 2011-03-08 11:54:34 +0000 |
commit | 758ad2e2ab8aca629336fd3c880a310e020c553b (patch) | |
tree | 18daac54587d903f4593214951bebffa427aaa8f /modules/postgresql | |
parent | a6b98521d6ebb4db7a90a252b827afd949e5a8b9 (diff) | |
download | puppet-758ad2e2ab8aca629336fd3c880a310e020c553b.tar puppet-758ad2e2ab8aca629336fd3c880a310e020c553b.tar.gz puppet-758ad2e2ab8aca629336fd3c880a310e020c553b.tar.bz2 puppet-758ad2e2ab8aca629336fd3c880a310e020c553b.tar.xz puppet-758ad2e2ab8aca629336fd3c880a310e020c553b.zip |
- add 2 types used for remote db and user, with tag support
Diffstat (limited to 'modules/postgresql')
-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'": |