summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToshio Kuratomi <toshio@fedoraproject.org>2015-01-28 14:23:46 -0800
committerToshio Kuratomi <toshio@fedoraproject.org>2015-01-28 14:24:57 -0800
commit3d5523fbb7131357f56df906a56afae1c732db5b (patch)
treecf3e4dc6815729d7e4e8ca10d311e15f456f9be0
parent181dd058ebb3e5e5288cb7668e6e9cd6841ebefc (diff)
downloadansible-3d5523fbb7131357f56df906a56afae1c732db5b.tar.gz
Fix for unicode filenames for template module
Fixes #10110
-rw-r--r--lib/ansible/utils/template.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/ansible/utils/template.py b/lib/ansible/utils/template.py
index 0098aa8b89..9556b8fcea 100644
--- a/lib/ansible/utils/template.py
+++ b/lib/ansible/utils/template.py
@@ -33,6 +33,7 @@ import ast
import traceback
from ansible.utils.string_functions import count_newlines_from_end
+from ansible.utils import to_bytes
class Globals(object):
@@ -272,7 +273,7 @@ def template_from_file(basedir, path, vars, vault_password=None):
managed_str = managed_default.format(
host = vars['template_host'],
uid = vars['template_uid'],
- file = vars['template_path']
+ file = to_bytes(vars['template_path'])
)
vars['ansible_managed'] = time.strftime(
managed_str,