postgresql_user
Collection: community.general
Full Name: parallax.community.general.postgresql_user
Aliases: community.general.postgresql_user, postgresql_user
Synopsis
Manage postgresql user
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| name | string | yes | Name of the PostgreSQL user (role) | |
| password | string | Password for the user | ||
| state | string | present | State of the user Choices: present, absent | |
| db | string | Name of database to connect to | ||
| 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 | |
| role_attr_flags | string | Role attribute flags (e.g. SUPERUSER,CREATEDB) | ||
| priv | string | Privileges to grant | ||
| expires | string | Password expiration date | ||
| conn_limit | int | -1 | Connection limit for the user | |
| encrypted | bool | true | Whether the password is stored encrypted | |
| no_password_changes | bool | false | Do not change the password if the user already exists | |
| fail_on_user | bool | true | Fail when user cannot be removed | |
| ssl_mode | string | prefer | SSL mode for the connection |
Example
- name: Example postgresql_user task
postgresql_user:
name: <your_name>