The postgres_users module is used to create and manage Postgres users.
frank:
postgres_user.present
salt.states.postgres_user.
absent
(name, user=None, maintenance_db=None, db_password=None, db_host=None, db_port=None, db_user=None)¶Ensure that the named user is absent
System user all operations should be performed on behalf of
New in version 0.17.0.
salt.states.postgres_user.
present
(name, createdb=None, createroles=None, createuser=None, encrypted=None, superuser=None, replication=None, inherit=None, login=None, password=None, refresh_password=None, groups=None, user=None, maintenance_db=None, db_password=None, db_host=None, db_port=None, db_user=None)¶Ensure that the named user is present with the specified privileges Please note that the user/group notion in postgresql is just abstract, we have roles, where users can be seens as roles with the LOGIN privilege and groups the others.
The user's password It can be either a plain string or a md5 postgresql hashed password:
'md5{MD5OF({password}{role}}'
If encrypted is None or True, the password will be automatically encrypted to the previous format if it is not already done.
Password refresh flag
Boolean attribute to specify whether to password comparison check should be performed.
If refresh_password is None or False, the password will be automatically updated without extra password change check.
This behaviour makes it possible to execute in environments without superuser access available, e.g. Amazon RDS for PostgreSQL
System user all operations should be performed on behalf of
New in version 0.17.0.