Commit b0f6e77f by Michael DeHaan

Merge pull request #4571 from tgerla/whitespace

add_group module: strip trailing/leading whitespace from comma-separated group names
parents 242f20c2 51a17092
......@@ -79,6 +79,7 @@ class ActionModule(object):
# add it to the group if that was specified
if groupnames != '':
for group_name in groupnames.split(","):
group_name = group_name.strip()
if not inventory.get_group(group_name):
new_group = Group(group_name)
inventory.add_group(new_group)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment