Merge "Don't remove host vars when removing host from group"
This commit is contained in:
commit
928b4a2ae7
|
@ -225,11 +225,10 @@ class Inventory(object):
|
|||
if not groupname or groupname == group.name:
|
||||
group.remove_host(host)
|
||||
|
||||
host_vars = os.path.join(get_host_vars_dir(), hostname)
|
||||
if os.path.exists(host_vars):
|
||||
os.remove(host_vars)
|
||||
|
||||
if not groupname:
|
||||
host_vars = os.path.join(get_host_vars_dir(), hostname)
|
||||
if os.path.exists(host_vars):
|
||||
os.remove(host_vars)
|
||||
del self._hosts[hostname]
|
||||
return changed
|
||||
|
||||
|
|
Loading…
Reference in New Issue