mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
jinja2 cannot handle byte strs with non-ascii. So we need to transform potential byte str into unicode type. This fix is for dynamic inventory.
Fixes #10007
This commit is contained in:
@@ -456,6 +456,8 @@ class PlaybookRunnerCallbacks(DefaultRunnerCallbacks):
|
||||
item = None
|
||||
if type(results) == dict:
|
||||
item = results.get('item', None)
|
||||
host = utils.to_bytes(host)
|
||||
results = utils.to_bytes(results)
|
||||
if item:
|
||||
msg = "fatal: [%s] => (item=%s) => %s" % (host, item, results)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user