mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-20 01:11:26 -07:00
* postgresql_privs: fix module fails when passing roles containing hyphens
* fix
* Improve testing
* Improve testing
* Add changelog fragment
* Improve testing
* fix CI Free BSD
(cherry picked from commit 434b83170a
)
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
This commit is contained in:
parent
06678d4ce3
commit
dd47c3a548
3 changed files with 99 additions and 3 deletions
|
@ -772,7 +772,7 @@ class Connection(object):
|
|||
# set_what: SQL-fragment specifying what to set for the target roles:
|
||||
# Either group membership or privileges on objects of a certain type
|
||||
if obj_type == 'group':
|
||||
set_what = ','.join('"%s"' % i for i in obj_ids)
|
||||
set_what = ','.join(obj_ids)
|
||||
elif obj_type == 'default_privs':
|
||||
# We don't want privs to be quoted here
|
||||
set_what = ','.join(privs)
|
||||
|
@ -1154,7 +1154,7 @@ def main():
|
|||
|
||||
except Error as e:
|
||||
conn.rollback()
|
||||
module.fail_json(msg=e.message, exception=traceback.format_exc())
|
||||
module.fail_json(msg=to_native(e), exception=traceback.format_exc())
|
||||
|
||||
except psycopg2.Error as e:
|
||||
conn.rollback()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue