mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Properly figure subset and restrictions into host cache pattern
Fixes #13111
This commit is contained in:
parent
ea0da421df
commit
0b999c602a
1 changed files with 6 additions and 1 deletions
|
@ -170,7 +170,12 @@ class Inventory(object):
|
|||
pattern_hash = u":".join(pattern)
|
||||
else:
|
||||
pattern_hash = pattern
|
||||
pattern_hash += u":%s" % ignore_limits_and_restrictions
|
||||
|
||||
if not ignore_limits_and_restrictions:
|
||||
if self._subset:
|
||||
pattern_hash += u":%s" % self._subset
|
||||
if self._restriction:
|
||||
pattern_hash += u":%s" % self._restriction
|
||||
|
||||
if pattern_hash in HOSTS_PATTERNS_CACHE:
|
||||
return HOSTS_PATTERNS_CACHE[pattern_hash][:]
|
||||
|
|
Loading…
Reference in a new issue