|
|
@ -18,15 +18,12 @@ DOCUMENTATION = r'''
|
|
|
|
module: postgresql_membership
|
|
|
|
module: postgresql_membership
|
|
|
|
short_description: Add or remove PostgreSQL roles from groups
|
|
|
|
short_description: Add or remove PostgreSQL roles from groups
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- Adds or removes PostgreSQL roles from groups (other roles)
|
|
|
|
- Adds or removes PostgreSQL roles from groups (other roles).
|
|
|
|
U(https://www.postgresql.org/docs/current/role-membership.html).
|
|
|
|
- Users are roles with login privilege.
|
|
|
|
- Users are roles with login privilege (see U(https://www.postgresql.org/docs/current/role-attributes.html) for more information).
|
|
|
|
|
|
|
|
- Groups are PostgreSQL roles usually without LOGIN privelege.
|
|
|
|
- Groups are PostgreSQL roles usually without LOGIN privelege.
|
|
|
|
- "Common use case:"
|
|
|
|
- "Common use case:"
|
|
|
|
- 1) add a new group (groups) by M(postgresql_user) module
|
|
|
|
- 1) add a new group (groups) by M(postgresql_user) module with I(role_attr_flags=NOLOGIN)
|
|
|
|
U(https://docs.ansible.com/ansible/latest/modules/postgresql_user_module.html) with I(role_attr_flags=NOLOGIN)
|
|
|
|
|
|
|
|
- 2) grant them desired privileges by M(postgresql_privs) module
|
|
|
|
- 2) grant them desired privileges by M(postgresql_privs) module
|
|
|
|
U(https://docs.ansible.com/ansible/latest/modules/postgresql_privs_module.html)
|
|
|
|
|
|
|
|
- 3) add desired PostgreSQL users to the new group (groups) by this module
|
|
|
|
- 3) add desired PostgreSQL users to the new group (groups) by this module
|
|
|
|
version_added: '2.8'
|
|
|
|
version_added: '2.8'
|
|
|
|
options:
|
|
|
|
options:
|
|
|
@ -74,6 +71,16 @@ options:
|
|
|
|
- Permissions checking for SQL commands is carried out as though
|
|
|
|
- Permissions checking for SQL commands is carried out as though
|
|
|
|
the session_role were the one that had logged in originally.
|
|
|
|
the session_role were the one that had logged in originally.
|
|
|
|
type: str
|
|
|
|
type: str
|
|
|
|
|
|
|
|
seealso:
|
|
|
|
|
|
|
|
- module: postgresql_user
|
|
|
|
|
|
|
|
- module: postgresql_privs
|
|
|
|
|
|
|
|
- module: postgresql_owner
|
|
|
|
|
|
|
|
- name: PostgreSQL role membership reference
|
|
|
|
|
|
|
|
description: Complete reference of the PostgreSQL role membership documentation.
|
|
|
|
|
|
|
|
link: https://www.postgresql.org/docs/current/role-membership.html
|
|
|
|
|
|
|
|
- name: PostgreSQL role attributes reference
|
|
|
|
|
|
|
|
description: Complete reference of the PostgreSQL role attributes documentation.
|
|
|
|
|
|
|
|
link: https://www.postgresql.org/docs/current/role-attributes.html
|
|
|
|
author:
|
|
|
|
author:
|
|
|
|
- Andrew Klychkov (@Andersson007)
|
|
|
|
- Andrew Klychkov (@Andersson007)
|
|
|
|
extends_documentation_fragment: postgres
|
|
|
|
extends_documentation_fragment: postgres
|
|
|
|