我已经安装了AWX并配置了某些剧本。我想使用AWX在.net控制台应用程序上运行ansible剧本。然而,为了做到这一点,我需要一个oauth令牌来使用postman登录。问题是我无法生成令牌。我尝试过使用AWX和其他几种方法,但仍然没有取得积极的结果。任何线索都将不胜感激。
发布于 2019-03-08 19:21:27
在这里尝试一下: curl -ku用户名:密码-H“-H-Type: application/json”-X POST -d '{"description":"Tower CLI","application":null,“scope”:“null”}‘tokens/ { jq -r .token’
发布于 2022-05-06 10:56:29
https://github.com/ansible/tower-cli/issues/478#issuecomment-370528556
$ curl -ku ryan:ryan -H "Content-Type: application/json" -X POST -d '{"description":"Tower CLI", "application":null, "scope":"read"}' https://awx.example.org/api/v2/users/1/personal_tokens/ | python -m json.tool
{
"application": null,
"created": "2018-03-05T19:06:56.224538Z",
"description": "Tower CLI",
"expires": "2018-03-06T05:06:56.223889Z",
"id": 4,
"modified": "2018-03-05T19:06:56.234208Z",
"refresh_token": null,
"related": {
"activity_stream": "/api/v2/tokens/4/activity_stream/",
"user": "/api/v2/users/1/"
},
"scope": "read",
"summary_fields": {
"user": {
"first_name": "",
"id": 1,
"last_name": "",
"username": "ryan"
}
},
"token": "ABy5N1fBiPujilEJjAUtmPlK8mTdGr",
"type": "o_auth2_access_token",
"url": "/api/v2/tokens/4/",
"user": 1
}https://stackoverflow.com/questions/54983803
复制相似问题