Revision
535
Author
misc
Date
2010-12-07 03:40:35 +0100 (Tue, 07 Dec 2010)

Log Message

- add the owner option, to set the user to whom the database will belong

Modified Paths

Modified: puppet/modules/postgresql/manifests/init.pp
===================================================================
--- puppet/modules/postgresql/manifests/init.pp	2010-12-07 02:40:34 UTC (rev 534)
+++ puppet/modules/postgresql/manifests/init.pp	2010-12-07 02:40:35 UTC (rev 535)
@@ -84,7 +84,7 @@
 
     # TODO convert it to a regular type ( so we can later change user and so on )
     define database($description="", $user="postgres") {
-        exec { "createdb -U postgres $name '$description'":
+        exec { "createdb -O $user -U postgres $name '$description'":
             user => root,
             unless => "psql -l -U postgres | grep '^$name|'",
         }