mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
Merge pull request #15455 from chemikadze/devel
Fix duplicate host with different uuid created after add_host
This commit is contained in:
@@ -402,10 +402,9 @@ class StrategyBase:
|
|||||||
|
|
||||||
host_name = host_info.get('host_name')
|
host_name = host_info.get('host_name')
|
||||||
|
|
||||||
# Check if host in cache, add if not
|
# Check if host in inventory, add if not
|
||||||
if host_name in self._inventory._hosts_cache:
|
new_host = self._inventory.get_host(host_name)
|
||||||
new_host = self._inventory._hosts_cache[host_name]
|
if not new_host:
|
||||||
else:
|
|
||||||
new_host = Host(name=host_name)
|
new_host = Host(name=host_name)
|
||||||
self._inventory._hosts_cache[host_name] = new_host
|
self._inventory._hosts_cache[host_name] = new_host
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user