我需要使用curl命令从ansible塔中检索给定项目(project_dev是项目名称)的ventory_id
curl -X GET -s -k -u "user:password" -vvv -H 'Content-Type:application/json' -d '{"organization": 1,"name": "project-dev"}' https://ansibletower.com/api/v2/inventories/"
答案 0 :(得分:0)
Q: I need to retrieve the inventory_id from ansible tower.
A:使用tower-cli
用法:tower-cli库存获得[选项] [ID]
Q: How to add special character password to tower-cli config?
A:使用tower_cli.cfg
$ cat $HOME/.tower_cli.cfg
[general]
host = http://srv.example.com
username = admin
password = password
verify_ssl = no