mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-04-18 16:31:26 -07:00
mysql_role: don't add members to a role when creating the role and "detach_members: true" is set (#367)
* mysql_role: don't add members to a role when creating the role and "detach_members: true" is set, add integration test * add changelog fragment * mysql_role: add author betanummeric * Update changelogs/fragments/367-mysql_role-fix-deatch-members.yml Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru> Co-authored-by: Felix Hamme <felix.hamme@ionos.com> Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
This commit is contained in:
parent
07a72865f7
commit
ceda7662d0
4 changed files with 33 additions and 0 deletions
|
@ -128,6 +128,7 @@ seealso:
|
|||
|
||||
author:
|
||||
- Andrew Klychkov (@Andersson007)
|
||||
- Felix Hamme (@betanummeric)
|
||||
|
||||
extends_documentation_fragment:
|
||||
- community.mysql.mysql
|
||||
|
@ -1028,6 +1029,8 @@ def main():
|
|||
if not role.exists:
|
||||
if subtract_privs:
|
||||
priv = None # avoid granting unwanted privileges
|
||||
if detach_members:
|
||||
members = None # avoid adding unwanted members
|
||||
changed = role.add(members, priv, module.check_mode, admin,
|
||||
set_default_role_all)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue