mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
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', '')))
|
||||
# add it to the group if that was specified
|
||||
if groupnames != '':
|
||||
if groupnames:
|
||||
for group_name in groupnames.split(","):
|
||||
group_name = group_name.strip()
|
||||
if not inventory.get_group(group_name):
|
||||
|
|
Loading…
Reference in a new issue