1
0
Fork 0
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:
James Cammarata 2015-11-10 08:23:31 -05:00
parent ea0da421df
commit 0b999c602a

View file

@ -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][:]