我正在请求使用ansible uri
模块在vmware上发布插件:
- name: Enable the App Launchpad plugin if it is set
uri:
url: "https://{{ URL }}/cloudapi/extensions/ui/{{ plugin_id }}/tenants/publish"
method: "POST"
status_code: 200
body_format: json
return_content: yes
body:
- name: "{{ org_name }}"
id: "{{ org_uuid }}"
headers:
Authorization: "{{ vdc_token }}"
但是我遇到了致命错误:
fatal: [localhost]: FAILED! => {"changed": false, "content": "", "elapsed": 0,
"msg": "Status code was -1 and not [200]: An unknown error occurred: got more than 100 headers",
"redirected": false, "status": -1,
"url": ".../cloudapi/extensions/ui/urn:vcloud:uiPlugin:b92bf.../tenants/publish"}
当我无障碍地直接发出请求时,它可以工作,但确实有100多个标头...
我无法控制返回的标头的数量,那么我该如何处理ansible剧本呢?