I am running an ansible script that returned an error message anytime I have added a JSON payload
TASK: [uri url=http://ec2-54-164-162-26.compute-1.amazonaws.com:7777/mmc-support method=POST user=admin password=admin return_content=yes HEADER_Content-Type="'application/json' ec2-54-165-243-43.compute-1.amazonaws.com:8080/mmc/api/servers"] *** failed: [ip-172-31-57-168.ec2.internal] => {"failed": true, "parsed": false} Traceback (most recent call last): File "/root/.ansible/tmp/ansible-tmp-1460552910.1-66349999814421/uri", line 2081, in <module> main() File "/root/.ansible/tmp/ansible-tmp-1460552910.1-66349999814421/uri", line 416, 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-1460552910.1-66349999814421/uri", line 312, in uri resp, content = h.request(url, method=method, body=body, headers=headers) File "/usr/lib/python2.7/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.7/site-packages/httplib2/__init__.py", line 1353, in _request (response, content) = self._conn_request(conn, request_uri, method, body, headers) File "/usr/lib/python2.7/site-packages/httplib2/__init__.py", line 1323, in _conn_request response = conn.getresponse() File "/usr/lib64/python2.7/httplib.py", line 1051, in getresponse response.begin() File "/usr/lib64/python2.7/httplib.py", line 415, in begin version, status, reason = self._read_status() File "/usr/lib64/python2.7/httplib.py", line 379, in _read_status raise BadStatusLine(line) httplib.BadStatusLine: '' FATAL: all hosts have already failed -- aborting PLAY RECAP ******************************************************************** to retry, use: --limit @/root/master.retry ip-172-31-57-168.ec2.internal : ok=37 changed=14 unreachable=0 failed=1 Here is the YAML : - uri: > url=http://{{ mule_urlagent }}:7777/mmc-support method=POST user=admin password=admin return_content=yes HEADER_Content-Type="'application/json' ec2-54-165-243-43.compute-1.amazonaws.com:8080/mmc/api/servers" -- 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/1d32868c-bc22-4192-b5f4-895c2ff1fca7%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
