I have below uri module where i am sending netscape cookie file.
It throws me back with error message,
- name: Register
uri:
url: “https://{{ orch_ip }}:19443/2/platforms/xxx/providers”
method: POST
return_content: yes
body: ‘u{{ isilon_orch_service_account_key }}’
body_format: json
validate_certs: no
status_code: 200,204
headers:
Cookie: ‘u{{ isilon_orch_cookie_file }}’
I get below error message:
TASK [Register] *************************************************************************************************************************************
task path: /etc/ansible/playbooks/deploy_1.yml:48
fatal: [10.150.0.15]: FAILED! => {“changed”: false, “connection”: “close”, “content”: “\n<html lang="en">\n \n Bad Request\n \n html, body, pre {\n margin: 0;\n padding: 0;\n font-family: Monaco, ‘Lucida Console’, monospace;\n background: #ECECEC;\n }\n h1 {\n margin: 0;\n background: #AD632A;\n padding: 20px 45px;\n color: #fff;\n text-shadow: 1px 1px 1px rgba(0,0,0,.3);\n border-bottom: 1px solid #9F5805;\n font-size: 28px;\n }\n p#detail {\n margin: 0;\n padding: 15px 45px;\n background: #F6A960;\n border-top: 4px solid #D29052;\n color: #733512;\n text-shadow: 1px 1px 1px rgba(255,255,255,.3);\n font-size: 14px;\n border-bottom: 1px solid #BA7F5B;\n }\n \n \n \n
Bad Request
\n\n <p id="detail">\n For request ‘POST /2/platforms/xxx/providers’ [Bad request: Error decoding json body: com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'u': was expecting ('true', 'false' or 'null')\n at [Source: (akka.util.ByteIterator$ByteArrayIterator$$anon$1); line: 1, column: 3]]\n \n\n \n\n”, “content_length”: “1424”, “content_type”: “text/html; charset=utf-8”, “date”: “Thu, 09 Aug 2018 06:22:36 GMT”, “msg”: “Status code was not [200, 204]: HTTP Error 400: Bad Request”, “redirected”: false, “status”: 400, “url”: “https://10.150.0.4:19443/2/platforms/xxx/providers”}below is {{ isilon_orch_cookie_file }} file looks like
#HttpOnly_10.150.0.4 FALSE / TRUE 0 PLAY_SESSION eyJhbGciOiJIUzI1NiJ9.eyJkYXRhIjp7InRpbWUiOiIxNTMzNzk1NzU1MDY4IiwiVVVJRCI6IjI0MGIyInVzZXIiOiJhZG1pbiJ9zMzc5NTc1NX0.npAMiDyTLQIMZ1kV3A6oHlOjShdWo3nMzBRn7YjbI5A
Need help on what format of netscape cookie file should be allowed in uri to understand and authentiate