我正在尝试从 Ansible 连接到 Rally。为此,我使用 uri 模块并从 Rally 创建了一个 API 密钥。我的任务:-
tasks:
- name: Get data
uri:
url: 'https://rally1.rallydev.com/slm/webservice/v2.0/subscription'
# headers:
# api_key: "myapikey"
user: myapikey
password:
follow_redirects: all
return_content: yes
status_code: 200
method: GET
register: get_data
- debug: var=get_data
但我仍然收到错误:-
"msg": "Status code was 401 and not [200]: HTTP Error 401: Full authentication is required to access this resource",
不知道我做错了什么。