mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-25 22:30:22 -07: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:
parent
2f1fc3e042
commit
915d232d5f
5 changed files with 42 additions and 4 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue