ansible / tower-cli

THIS TOOL IS NO LONGER UNDER ACTIVE DEVELOPMENT. This tool is being phased out in favor of the new official AWX CLI
https://github.com/ansible/awx/tree/devel/awxkit/awxkit/cli/docs
Apache License 2.0
363 stars 151 forks source link

List servers in groups #503

Open pemca opened 6 years ago

pemca commented 6 years ago

Make it possible to list servers in a group would be a fine feature.

AlanCoding commented 6 years ago

Hosts with direct membership in the group, or all hosts that are implicitly a member of it?

pemca commented 6 years ago

Hi, At least the hosts with direct membership, but maybe a additional parameter could show all hosts that are implicitly a member. Thanks Peter

AlanCoding commented 6 years ago

You can list directly children by

$ tower-cli host list --query groups 24
== ===== ========= ======= 
id name  inventory enabled 
== ===== ========= ======= 
15 host1        10    true
16 host2        10    true
== ===== ========= ======= 
pemca commented 6 years ago

Super : Works fine :+1: tower-cli host list --query groups 9 === =================== ====================== ========= ======= id name description inventory enabled === =================== ====================== ========= ======= 151 khk9dst11.ip.tdk.dk CS-AS1 Scale Test ICS5 3 true 153 khk9dst12.ip.tdk.dk CS-AS2 Scale Test ICS5 3 true 154 khk9dst13.ip.tdk.dk CS-AS1 BT Test ICS5 3 true 86 khk9dst14.ip.tdk.dk CS-AS2 BT Test ICS5 3 true === =================== ====================== ========= =======