mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-20 23:30:22 -07:00
clear correct cache when reconcile is invoked
moved it to ensure all callers get the correct hosts after
This commit is contained in:
parent
7dc60c3f24
commit
fc9b44e021
2 changed files with 1 additions and 4 deletions
|
@ -615,9 +615,6 @@ class StrategyBase:
|
|||
new_group = self._inventory.groups[group_name]
|
||||
new_group.add_host(self._inventory.hosts[host_name])
|
||||
|
||||
# clear pattern caching completely since it's unpredictable what patterns may have referenced the group
|
||||
self._inventory.clear_pattern_cache()
|
||||
|
||||
# reconcile inventory, ensures inventory rules are followed
|
||||
self._inventory.reconcile_inventory()
|
||||
|
||||
|
@ -655,7 +652,6 @@ class StrategyBase:
|
|||
changed = True
|
||||
|
||||
if changed:
|
||||
self._inventory.clear_pattern_cache()
|
||||
self._inventory.reconcile_inventory()
|
||||
|
||||
return changed
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue