community.general/lib/ansible/modules/database/postgresql
Feike Steenbergen 38e70ea317 Add session_role to postgresql modules (#43650)
* Allow session_role to be set for PostgreSQL

By implementing session_role it becomes possible to run the specific
PostgreSQL commands as a different role.
The usecase that is immediately served by this, is the one that one
ansible playbook can be shared by multiple users, which all have
their
own PostgreSQL login_user. They do not need to share login
credentials,
as they can share the role within the PostgreSQL database.

The following example may give some insight:

$ psql -U jdoe -X -d postgres

postgres=> CREATE DATABASE abc;
ERROR:  permission denied to create database
postgres=> set role postgres;
SET
postgres=# CREATE DATABASE abc;
CREATE DATABASE

fixes #43592

* Tests for session_role in PostgreSQL

* Bump version_added for session_role feature

* Remove explicit encrypted parameter from tests
2019-02-02 20:12:14 +01:00
..
__init__.py Some more module categorization. 2016-12-08 11:22:25 -05:00
postgresql_db.py Add session_role to postgresql modules (#43650) 2019-02-02 20:12:14 +01:00
postgresql_ext.py Add session_role to postgresql modules (#43650) 2019-02-02 20:12:14 +01:00
postgresql_idx.py postgresql_idx: misc fixes (#50199) 2018-12-21 16:31:41 +05:30
postgresql_lang.py Add session_role to postgresql modules (#43650) 2019-02-02 20:12:14 +01:00
postgresql_privs.py Add session_role to postgresql modules (#43650) 2019-02-02 20:12:14 +01:00
postgresql_schema.py Add session_role to postgresql modules (#43650) 2019-02-02 20:12:14 +01:00
postgresql_user.py Add session_role to postgresql modules (#43650) 2019-02-02 20:12:14 +01:00