mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 12:50:22 -07:00
Make add_host clear the inventory pattern cache, add some more aliases. Fixes #4442.
This commit is contained in:
parent
9c9ec52b04
commit
41aaad69aa
3 changed files with 12 additions and 4 deletions
|
@ -266,6 +266,10 @@ class Inventory(object):
|
|||
self._pattern_hosts[pattern] = results
|
||||
return self._pattern_hosts[pattern]
|
||||
|
||||
def clear_pattern_cache(self):
|
||||
''' called exclusively by the add_host plugin to allow patterns to be recalculated '''
|
||||
self._pattern_hosts = {}
|
||||
|
||||
def groups_for_host(self, host):
|
||||
results = []
|
||||
groups = self.get_groups()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue