fix 'ungrouped' issue with some inventory formats

This commit is contained in:
Brian Coca 2017-03-07 11:57:20 -05:00 committed by Brian Coca
parent 20bf02f6b9
commit c4cff44e77
3 changed files with 15 additions and 0 deletions

View file

@ -114,6 +114,12 @@ class Group:
host.add_group(self)
self.clear_hosts_cache()
def remove_host(self, host):
self.hosts.remove(host)
host.remove_group(self)
self.clear_hosts_cache()
def set_variable(self, key, value):
self.vars[key] = value