Hi all,
I am on CentOS 6.7 using Ansible 1.9 and I’ve updated my version of Ansible to be ansible1.9-1.9.6-2 (retrieved from EPEL).
I have some tasks ([1]) which upload (via POST) dashboards to Grafana. Those tasks used to run just fine in the previous version of Ansible (4-2) but with the most recent release of the 1.9 branch, they fail with an error ([2]).
[1]
- name: import the Cluster dashboards
uri:
url: http://127.0.0.1:3000/api/dashboards/db
method: POST
body: “{{ lookup(‘file’, ‘/tmp/cluster.json’) }}”
body_format: json
HEADER_Content-Type: “application/json”
user: admin
password: admin
force_basic_auth: yes
[2]
TASK: [grafana-2-dashboards | import the Cluster dashboards] ******************
failed: [10.165.1.41] => {“failed”: true, “parsed”: false}
BECOME-SUCCESS-pjcvvpproqvedvdzjlxsjvwndajwkzee
Traceback (most recent call last):
File “/root/.ansible/tmp/ansible-tmp-1463513575.1-256930227119349/uri”, line 2106, in
main()
File “/root/.ansible/tmp/ansible-tmp-1463513575.1-256930227119349/uri”, line 415, in main
resp, content, dest = uri(module, url, dest, user, password, body, method, dict_headers, redirects, socket_timeout, validate_certs)
File “/root/.ansible/tmp/ansible-tmp-1463513575.1-256930227119349/uri”, line 311, in uri
resp, content = h.request(url, method=method, body=body, headers=headers)
File “/usr/lib/python2.6/site-packages/httplib2/init.py”, line 1605, in request
(response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
File “/usr/lib/python2.6/site-packages/httplib2/init.py”, line 1353, in _request
(response, content) = self._conn_request(conn, request_uri, method, body, headers)
File “/usr/lib/python2.6/site-packages/httplib2/init.py”, line 1290, in _conn_request
conn.request(method, request_uri, body, headers)
File “/usr/lib64/python2.6/httplib.py”, line 936, in request
self._send_request(method, url, body, headers)
File “/usr/lib64/python2.6/httplib.py”, line 976, in _send_request
self.send(body)
File “/usr/lib64/python2.6/httplib.py”, line 781, in send
self.sock.sendall(str)
File “”, line 1, in sendall
TypeError: sendall() argument 1 must be string or buffer, not dict
OpenSSH_5.3p1, OpenSSL 1.0.1e-fips 11 Feb 2013
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: auto-mux: Trying existing master
debug1: mux_client_request_session: master session id: 2
debug1: mux_client_request_session: master session id: 2
I would appreciate any pointers to help me debug this.
Thanks in advance for your help.
Guillaume.