Add actual postgresl module from puppetlabs
[mirror/dsa-puppet.git] / 3rdparty / modules / postgresql / manifests / table_grant.pp
diff --git a/3rdparty/modules/postgresql/manifests/table_grant.pp b/3rdparty/modules/postgresql/manifests/table_grant.pp
new file mode 100644 (file)
index 0000000..850a15c
--- /dev/null
@@ -0,0 +1,20 @@
+# Resource postgresql::table_grant
+define postgresql::table_grant(
+  $privilege,
+  $table,
+  $db,
+  $role,
+  $psql_db   = undef,
+  $psql_user = undef
+) {
+  include postgresql::params
+  postgresql::grant { "table:${name}":
+    role        => $role,
+    db          => $db,
+    privilege   => $privilege,
+    object_type => 'TABLE',
+    object_name => $table,
+    psql_db     => $psql_db,
+    psql_user   => $psql_user,
+  }
+}