mysql_role - don't add members to a role when creating the role and detach_members true is set

This commit is contained in:
betanummeric 2022-05-25 11:47:39 +02:00 committed by Andrew Klychkov
commit d883d18615
4 changed files with 33 additions and 0 deletions

View file

@ -119,6 +119,7 @@ seealso:
author:
- Andrew Klychkov (@Andersson007)
- Felix Hamme (@betanummeric)
extends_documentation_fragment:
- community.mysql.mysql
@ -1006,6 +1007,8 @@ def main():
try:
if state == 'present':
if not role.exists:
if detach_members:
members = None # avoid adding unwanted members
changed = role.add(members, priv, module.check_mode, admin,
set_default_role_all)