从 ansible tower 中获取 inventory-id 的 curl 命令
Curl command to get inventory-id from ansible tower
我需要使用 curl 命令从 ansible tower 中检索给定项目的 inventory_id(project_dev 是项目名称)
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/"
问:I need to retrieve the inventory_id from ansible tower.
A:使用tower-cli
Usage: tower-cli inventory get [OPTIONS] [ID]
问: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
我需要使用 curl 命令从 ansible tower 中检索给定项目的 inventory_id(project_dev 是项目名称)
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/"
问:I need to retrieve the inventory_id from ansible tower.
A:使用tower-cli
Usage: tower-cli inventory get [OPTIONS] [ID]
问: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