From 188ab7b952cfea17d991d0df9387772bf91c3140 Mon Sep 17 00:00:00 2001 From: James Cammarata Date: Thu, 29 May 2014 11:01:11 -0500 Subject: [PATCH] Check groupnames for None as well as an empty string in add_host Fixes #7585 --- lib/ansible/runner/action_plugins/add_host.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/runner/action_plugins/add_host.py b/lib/ansible/runner/action_plugins/add_host.py index bcd1a90ae9..2ab2164d5c 100644 --- a/lib/ansible/runner/action_plugins/add_host.py +++ b/lib/ansible/runner/action_plugins/add_host.py @@ -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):