Hello,
I have:
Red Hat Enterprise Linux Server release 6.7 (Santiago)
Linux x.utu.fi 2.6.32-504.30.3.el6.x86_64 #1 SMP Thu Jul 9 15:20:47 EDT
2015 x86_64 x86_64 x86_64 GNU/Linux
# ansible --version
ansible 2.0.0
config file = /etc/ansible/ansible.cfg
configured module search path = /etc/ansible/library
# cat reproduce.yml
---
- hosts: localhost
tasks:
- name: foo
shell: "true"
with_items:
- foo
- bar
# ansible-playbook reproduce.yml -vvv
...
TASK [foo]
*********************************************************************
ESTABLISH LOCAL CONNECTION FOR USER: root
127.0.0.1 EXEC mkdir -p
"$HOME/.ansible/tmp/ansible-tmp-1441900074.83-151106908408783" && echo
"$HOME/.ansible/tmp/ansible-tmp-1441900074.83-151106908408783"
127.0.0.1 PUT /tmp/tmp2XuR76 TO
/root/.ansible/tmp/ansible-tmp-1441900074.83-151106908408783/command
127.0.0.1 EXEC LANG=C LC_MESSAGES=C LC_CTYPE=C /usr/bin/python
/root/.ansible/tmp/ansible-tmp-1441900074.83-151106908408783/command; rm
-rf "/root/.ansible/tmp/
ansible-tmp-1441900074.83-151106908408783/" > /dev/null 2>&1
ESTABLISH LOCAL CONNECTION FOR USER: root
127.0.0.1 EXEC mkdir -p
"$HOME/.ansible/tmp/ansible-tmp-1441900074.91-107992728137762" && echo
"$HOME/.ansible/tmp/ansible-tmp-1441900074.91-107992728137762"
127.0.0.1 PUT /tmp/tmppaIjQW TO
/root/.ansible/tmp/ansible-tmp-1441900074.91-107992728137762/command
127.0.0.1 EXEC LANG=C LC_MESSAGES=C LC_CTYPE=C /usr/bin/python
/root/.ansible/tmp/ansible-tmp-1441900074.91-107992728137762/command; rm
-rf "/root/.ansible/tmp/
ansible-tmp-1441900074.91-107992728137762/" > /dev/null 2>&1
An exception occurred during task execution. The full traceback is:
Traceback (most recent call last):
File
"/usr/lib/python2.6/site-packages/ansible-2.0.0-py2.6.egg/ansible/executor/process/worker.py",
line 119, in run
executor_result = TaskExecutor(host, task, job_vars, new_play_context,
self._new_stdin, self._loader, shared_loader_obj).run()
File
"/usr/lib/python2.6/site-packages/ansible-2.0.0-py2.6.egg/ansible/executor/task_executor.py",
line 127, in run
result = json.dumps(res, default=json_variable_cleaner)
File "/usr/lib64/python2.6/json/__init__.py", line 237, in dumps
**kw).encode(obj)
File "/usr/lib64/python2.6/json/encoder.py", line 367, in encode
chunks = list(self.iterencode(o))
File "/usr/lib64/python2.6/json/encoder.py", line 309, in _iterencode
for chunk in self._iterencode_dict(o, markers):
File "/usr/lib64/python2.6/json/encoder.py", line 275, in _iterencode_dict
for chunk in self._iterencode(value, markers):
File "/usr/lib64/python2.6/json/encoder.py", line 306, in _iterencode
for chunk in self._iterencode_list(o, markers):
File "/usr/lib64/python2.6/json/encoder.py", line 204, in _iterencode_list
for chunk in self._iterencode(value, markers):
File "/usr/lib64/python2.6/json/encoder.py", line 309, in _iterencode
for chunk in self._iterencode_dict(o, markers):
File "/usr/lib64/python2.6/json/encoder.py", line 275, in _iterencode_dict
for chunk in self._iterencode(value, markers):
File "/usr/lib64/python2.6/json/encoder.py", line 294, in _iterencode
yield encoder(o)
TypeError: first argument must be a string or unicode, not
UnsafeProxy(AnsibleUnicode)
fatal: [localhost]: FAILED! => {"failed": true, "stdout": ""}
I tried to google around, but I didn't manage to find anything obvious. I
have another test server with Ubuntu that doesn't have this problem. I also
tried to install Python 2.7, but that didn't help either.
--
Eino Tuominen
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/fef0e26a-84cd-4bb0-a569-8690ad36efc2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.