1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

readd all.add_host as for loop uses diff data

This commit is contained in:
Brian Coca 2017-03-08 15:43:44 -05:00
parent cfd313bced
commit 78e116077a

View file

@ -140,6 +140,7 @@ class Inventory(object):
display.warning("A duplicate localhost-like entry was found (%s). First found localhost was %s" % (h, self.localhost.name)) display.warning("A duplicate localhost-like entry was found (%s). First found localhost was %s" % (h, self.localhost.name))
display.vvvv("Set default localhost to %s" % h) display.vvvv("Set default localhost to %s" % h)
self.localhost = new_host self.localhost = new_host
all.add_host(new_host)
elif self._loader.path_exists(host_list): elif self._loader.path_exists(host_list):
# TODO: switch this to a plugin loader and a 'condition' per plugin on which it should be tried, restoring 'inventory pllugins' # TODO: switch this to a plugin loader and a 'condition' per plugin on which it should be tried, restoring 'inventory pllugins'
if self.is_directory(host_list): if self.is_directory(host_list):