From 2120f59ce3b68118208822ae8891447a42f9df30 Mon Sep 17 00:00:00 2001 From: Jim Chanco Jr <69092730+jchancojr@users.noreply.github.com> Date: Wed, 11 May 2022 09:16:55 -0400 Subject: [PATCH] Issue 240 (#260) --- plugins/modules/postgresql_owner.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/plugins/modules/postgresql_owner.py b/plugins/modules/postgresql_owner.py index ddcb6d11c..95ac4a2a7 100644 --- a/plugins/modules/postgresql_owner.py +++ b/plugins/modules/postgresql_owner.py @@ -36,9 +36,11 @@ - type reassign_owned_by: description: - - The list of role names. The ownership of all the objects within the current database, - and of all shared objects (databases, tablespaces), owned by this role(s) will be reassigned to I(owner). - - Pay attention - it reassigns all objects owned by this role(s) in the I(instance)! + - Caution - the ownership of all the objects within the specified I(db), + owned by this role(s) will be reassigned to I(new_owner). + - REASSIGN OWNED is often used to prepare for the removal of one or more roles. + - REASSIGN OWNED does not affect objects within other databases. + - Execute this command in each database that contains objects owned by a role that is to be removed. - If role(s) exists, always returns changed True. - Cannot reassign ownership of objects that are required by the database system. - Mutually exclusive with C(obj_type). @@ -119,13 +121,13 @@ obj_name: ssd obj_type: tablespace -- name: Reassign all object in database bar owned by bob to alice +- name: Reassign all databases owned by bob to alice and all objects in database bar owned by bob to alice community.postgresql.postgresql_owner: db: bar new_owner: alice reassign_owned_by: bob -- name: Reassign all object in database bar owned by bob and bill to alice +- name: Reassign all databases owned by bob or bill to alice and all objects in database bar owned by bob or bill to alice community.postgresql.postgresql_owner: db: bar new_owner: alice