postgresql_privs
Collection: community.general
Full Name: parallax.community.general.postgresql_privs
Aliases: community.general.postgresql_privs, postgresql_privs
Synopsis
Manage postgresql privs
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| database | string | yes | Name of the database to grant/revoke privileges on | |
| roles | string | yes | Comma-separated list of role names | |
| type | string | table | Type of database object (table, sequence, function, database, schema, etc.) | |
| objs | string | Comma-separated list of database objects to set privileges on | ||
| privs | string | Comma-separated list of privileges to grant/revoke | ||
| state | string | present | State of the privileges Choices: present, absent | |
| schema | string | public | Schema that contains the database objects | |
| grant_option | bool | false | Whether to grant WITH GRANT OPTION | |
| login_host | string | localhost | Host running the database | |
| login_user | string | postgres | User to authenticate with | |
| login_password | string | Password for authentication | ||
| port | int | 5432 | Database port to connect to | |
| ssl_mode | string | prefer | SSL mode for the connection | |
| target_roles | string | Target roles for default privileges |
Example
- name: Example postgresql_privs task
postgresql_privs:
database: <your_database>
roles: <your_roles>