postgresql_privs

Collection: community.general

Full Name: parallax.community.general.postgresql_privs

Aliases: community.general.postgresql_privs, postgresql_privs

Synopsis

Manage postgresql privs

Parameters

NameTypeRequiredDefaultDescription
databasestringyesName of the database to grant/revoke privileges on
rolesstringyesComma-separated list of role names
typestringtableType of database object (table, sequence, function, database, schema, etc.)
objsstringComma-separated list of database objects to set privileges on
privsstringComma-separated list of privileges to grant/revoke
statestringpresentState of the privileges Choices: present, absent
schemastringpublicSchema that contains the database objects
grant_optionboolfalseWhether to grant WITH GRANT OPTION
login_hoststringlocalhostHost running the database
login_userstringpostgresUser to authenticate with
login_passwordstringPassword for authentication
portint5432Database port to connect to
ssl_modestringpreferSSL mode for the connection
target_rolesstringTarget roles for default privileges

Example

- name: Example postgresql_privs task
  postgresql_privs:
    database: <your_database>
    roles: <your_roles>