Update readme
This commit is contained in:
parent
6890a56eb7
commit
a946157a42
1 changed files with 39 additions and 6 deletions
39
README.md
39
README.md
|
@ -97,13 +97,21 @@ To manage users, roles and permissions:
|
||||||
password_hash => 'foo',
|
password_hash => 'foo',
|
||||||
}
|
}
|
||||||
|
|
||||||
postgresql::database_grant{'test1':
|
postgresql::database_grant { 'test1':
|
||||||
privilege => 'ALL',
|
privilege => 'ALL',
|
||||||
db => 'test1',
|
db => 'test1',
|
||||||
role => 'dan',
|
role => 'dan',
|
||||||
}
|
}
|
||||||
|
|
||||||
In this example, you would grant ALL privileges on the test1 database to the user or group specified by dan.
|
postgresql::table_grant { 'my_table of test2':
|
||||||
|
privilege => 'ALL',
|
||||||
|
table => 'my_table',
|
||||||
|
db => 'test2',
|
||||||
|
role => 'dan',
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
In this example, you would grant ALL privileges on the test1 database and on the `my_table` table of the test2 database to the user or group specified by dan.
|
||||||
|
|
||||||
At this point, you would just need to plunk these database name/username/password values into your PuppetDB config files, and you are good to go.
|
At this point, you would just need to plunk these database name/username/password values into your PuppetDB config files, and you are good to go.
|
||||||
|
|
||||||
|
@ -127,6 +135,7 @@ Resources:
|
||||||
* [postgresql::db](#resource-postgresqldb)
|
* [postgresql::db](#resource-postgresqldb)
|
||||||
* [postgresql::database](#resource-postgresqldatabase)
|
* [postgresql::database](#resource-postgresqldatabase)
|
||||||
* [postgresql::database_grant](#resource-postgresqldatabasegrant)
|
* [postgresql::database_grant](#resource-postgresqldatabasegrant)
|
||||||
|
* [postgresql::table_grant](#resource-postgresqltablegrant)
|
||||||
* [postgresql::role](#resource-postgresqlrole)
|
* [postgresql::role](#resource-postgresqlrole)
|
||||||
* [postgresql::tablespace](#resource-postgresqltablespace)
|
* [postgresql::tablespace](#resource-postgresqltablespace)
|
||||||
* [postgresql::validate_db_connection](#resource-postgresqlvalidatedbconnection)
|
* [postgresql::validate_db_connection](#resource-postgresqlvalidatedbconnection)
|
||||||
|
@ -341,7 +350,7 @@ This defined type manages grant based access privileges for users. Consult the P
|
||||||
Used to uniquely identify this resource, but functionality not used during grant.
|
Used to uniquely identify this resource, but functionality not used during grant.
|
||||||
|
|
||||||
####`privilege`
|
####`privilege`
|
||||||
Can be one of `SELECT`, `INSERT`, `UPDATE`, `DELETE`, `TRUNCATE`, `REFERENCES`, `TRIGGER`, `USAGE`, `TEMPORARY`, `TEMP`, `CONNECT`. `ALL` is used as a synonym for `CREATE`. If you need to add multiple privileges, a space delimited string can be used.
|
Can be one of `SELECT`, `TEMPORARY`, `TEMP`, `CONNECT`. `ALL` is used as a synonym for `CREATE`. If you need to add multiple privileges, a space delimited string can be used.
|
||||||
|
|
||||||
####`db`
|
####`db`
|
||||||
Database to grant access to.
|
Database to grant access to.
|
||||||
|
@ -355,6 +364,30 @@ Database to execute the grant against. This should not ordinarily be changed fro
|
||||||
####`psql_user`
|
####`psql_user`
|
||||||
OS user for running `psql`. Defaults to the default user for the module, usually `postgres`.
|
OS user for running `psql`. Defaults to the default user for the module, usually `postgres`.
|
||||||
|
|
||||||
|
###Resource: postgresql::table\_grant
|
||||||
|
This defined type manages grant based access privileges for users. Consult the PostgreSQL documentation for `grant` for more information.
|
||||||
|
|
||||||
|
####`namevar`
|
||||||
|
Used to uniquely identify this resource, but functionality not used during grant.
|
||||||
|
|
||||||
|
####`privilege`
|
||||||
|
Can be one of `SELECT`, `INSERT`, `UPDATE`, `REFERENCES`. `ALL` is used as a synonym for `CREATE`. If you need to add multiple privileges, a space delimited string can be used.
|
||||||
|
|
||||||
|
####`table`
|
||||||
|
Table to grant access on.
|
||||||
|
|
||||||
|
####`db`
|
||||||
|
Database of table.
|
||||||
|
|
||||||
|
####`role`
|
||||||
|
Role or user whom you are granting access for.
|
||||||
|
|
||||||
|
####`psql_db`
|
||||||
|
Database to execute the grant against. This should not ordinarily be changed from the default, which is `postgres`.
|
||||||
|
|
||||||
|
####`psql_user`
|
||||||
|
OS user for running `psql`. Defaults to the default user for the module, usually `postgres`.
|
||||||
|
|
||||||
###Resource: postgresql::role
|
###Resource: postgresql::role
|
||||||
This resource creates a role or user in PostgreSQL.
|
This resource creates a role or user in PostgreSQL.
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue