Skip to content

Commit

Permalink
Remove redundant check for group membership in add_host (ansible#30530)
Browse files Browse the repository at this point in the history
  • Loading branch information
jctanner authored Sep 19, 2017
1 parent f3865e3 commit 5aebcd4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ansible/inventory/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def add_host(self, host, group=None, port=None):
else:
h = self.hosts[host]

if g and h not in g.get_hosts():
if g:
g.add_host(h)
self._groups_dict_cache = {}
display.debug("Added host %s to group %s" % (host, group))
Expand Down

0 comments on commit 5aebcd4

Please sign in to comment.