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

Co-authored-by: betanummeric <40263343+betanummeric@users.noreply.github.com>
This commit is contained in:
Andrew Klychkov 2022-05-25 17:22:39 +03:00 committed by GitHub
parent e34cfba109
commit 46dc308e28
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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)