Check groupnames for None as well as an empty string in add_host
Fixes #7585
This commit is contained in:
parent
202ac68995
commit
188ab7b952
1 changed files with 1 additions and 1 deletions
|
@ -77,7 +77,7 @@ class ActionModule(object):
|
||||||
|
|
||||||
groupnames = args.get('groupname', args.get('groups', args.get('group', '')))
|
groupnames = args.get('groupname', args.get('groups', args.get('group', '')))
|
||||||
# add it to the group if that was specified
|
# add it to the group if that was specified
|
||||||
if groupnames != '':
|
if groupnames:
|
||||||
for group_name in groupnames.split(","):
|
for group_name in groupnames.split(","):
|
||||||
group_name = group_name.strip()
|
group_name = group_name.strip()
|
||||||
if not inventory.get_group(group_name):
|
if not inventory.get_group(group_name):
|
||||||
|
|
Loading…
Reference in a new issue