salt.states.postgres_user

Management of PostgreSQL users (roles).

The postgres_users module is used to create and manage Postgres users.

frank:
  postgres_user.present
salt.states.postgres_user.absent(name, runas=None, user=None)

Ensure that the named user is absent

name
The username of the user to remove
runas

System user all operations should be performed on behalf of

Deprecated since version 0.17.0.

user

System user all operations should be performed on behalf of

New in version 0.17.0.

salt.states.postgres_user.present(name, createdb=False, createuser=False, encrypted=False, superuser=False, replication=False, password=None, groups=None, runas=None, user=None)

Ensure that the named user is present with the specified privileges

name
The name of the user to manage
createdb
Is the user allowed to create databases?
createuser
Is the user allowed to create other users?
encrypted
Should the password be encrypted in the system catalog?
superuser
Should the new user be a "superuser"
replication
Should the new user be allowed to initiate streaming replication
password
The user's password
groups
A string of comma separated groups the user should be in
runas

System user all operations should be performed on behalf of

Deprecated since version 0.17.0.

user

System user all operations should be performed on behalf of

New in version 0.17.0.