From 78e116077ae411a7a8e720222bf25ebb85a9fb47 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Wed, 8 Mar 2017 15:43:44 -0500 Subject: [PATCH] readd all.add_host as for loop uses diff data --- lib/ansible/inventory/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/ansible/inventory/__init__.py b/lib/ansible/inventory/__init__.py index 591d02be3d4..b001f64238f 100644 --- a/lib/ansible/inventory/__init__.py +++ b/lib/ansible/inventory/__init__.py @@ -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.vvvv("Set default localhost to %s" % h) self.localhost = new_host + all.add_host(new_host) 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' if self.is_directory(host_list):