1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Merge pull request #1728 from dagwieers/nameerror-fix

Fix "NameError: global name 'name' is not defined" exception
This commit is contained in:
Michael DeHaan 2012-12-05 10:34:36 -08:00
commit cc76b4f5b1

View file

@ -195,7 +195,7 @@ def main():
if group.group_exists(): if group.group_exists():
(rc, out, err) = group.group_del() (rc, out, err) = group.group_del()
if rc != 0: if rc != 0:
module.fail_json(name=name, msg=err) module.fail_json(name=group.name, msg=err)
elif group.state == 'present': elif group.state == 'present':
if not group.group_exists(): if not group.group_exists():
(rc, out, err) = group.group_add(gid=group.gid, system=group.system) (rc, out, err) = group.group_add(gid=group.gid, system=group.system)