mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00:00
avoid problem with old mongo version without roles
This commit is contained in:
committed by
Matt Clay
parent
b07e1c13f7
commit
467d9a8090
@@ -278,7 +278,7 @@ def main():
|
|||||||
uinfo = user_find(client, user, db_name)
|
uinfo = user_find(client, user, db_name)
|
||||||
if update_password != 'always' and uinfo:
|
if update_password != 'always' and uinfo:
|
||||||
password = None
|
password = None
|
||||||
if list(map((lambda x: x['role']), uinfo['roles'])) == roles:
|
if 'roles' in uinfo and list(map((lambda x: x['role']), uinfo['roles'])) == roles:
|
||||||
module.exit_json(changed=False, user=user)
|
module.exit_json(changed=False, user=user)
|
||||||
|
|
||||||
if module.check_mode:
|
if module.check_mode:
|
||||||
|
|||||||
Reference in New Issue
Block a user