saltstack/salt — Issue #637: unicode issues in jinja file template
Author: thatch45
Created: 2012-02-03 16:39:14+00:00
State: open

Hi there
As requested. Trying to push the attached file out using this sls:

/etc/bird.conf:
file:
- managed
- source: salt://rdns/bird.conf
- require:
- pkg: bird
- template: jinja

Gives me this traceback:
rdns01.at.allurian.local:
----------
State: - file
Name: conf./etc/bird.conf
Function: managed
Result: False
Comment: Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/salt/states/file.py", line 218, in _jinja
open(tgt, 'w+').write(template.render(**passthrough))
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2019' in position 169: ordinal not in range(128)

Changes: