mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Make sure pattern cache components are converted to unicode
This commit is contained in:
parent
0b999c602a
commit
e56fd9e95d
1 changed files with 3 additions and 2 deletions
|
@ -34,6 +34,7 @@ from ansible.inventory.dir import InventoryDirectory, get_file_parser
|
|||
from ansible.inventory.group import Group
|
||||
from ansible.inventory.host import Host
|
||||
from ansible.plugins import vars_loader
|
||||
from ansible.utils.unicode import to_unicode
|
||||
from ansible.utils.vars import combine_vars
|
||||
from ansible.parsing.utils.addresses import parse_address
|
||||
|
||||
|
@ -173,9 +174,9 @@ class Inventory(object):
|
|||
|
||||
if not ignore_limits_and_restrictions:
|
||||
if self._subset:
|
||||
pattern_hash += u":%s" % self._subset
|
||||
pattern_hash += u":%s" % to_unicode(self._subset)
|
||||
if self._restriction:
|
||||
pattern_hash += u":%s" % self._restriction
|
||||
pattern_hash += u":%s" % to_unicode(self._restriction)
|
||||
|
||||
if pattern_hash in HOSTS_PATTERNS_CACHE:
|
||||
return HOSTS_PATTERNS_CACHE[pattern_hash][:]
|
||||
|
|
Loading…
Reference in a new issue