1
0
Fork 0
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:
James Cammarata 2014-05-29 11:01:11 -05:00
parent 202ac68995
commit 188ab7b952

View file

@ -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):