AWX provides a web-based user interface, REST API, and task engine built on top of Ansible. It is one of the upstream projects for Red Hat Ansible Automation Platform.
Other
14.12k
stars
3.44k
forks
source link
Add smart inventory host filter lookup text input #7850
Expose a simple text input that a user could opt in to when creating a smart inventory host filter where a complete host_filter string could be supplied. This would serve 2 purposes:
Users wanting to specify complex/non-ui supported host filter strings could do so in the UI and wouldn't have to go through the API browser
If the UI detects a string that we can't parse into consumable search tags then we just show the string in the input.
Example of a host filter string that the user could type into the input:
(name=bengal and groups__name=Cat) or (name=vizsla and groups__name=Dog)
To retrieve the corresponding list of hosts and display them in the modal, the same filter string above must be url-encoded:
I would love this feature, right now we can only filter on one ansible_fact at a time, but we brought in all of our aws tags as ansible facts and are limited here.
ISSUE TYPE
SUMMARY
Expose a simple text input that a user could opt in to when creating a smart inventory host filter where a complete host_filter string could be supplied. This would serve 2 purposes:
Example of a host filter string that the user could type into the input:
To retrieve the corresponding list of hosts and display them in the modal, the same filter string above must be url-encoded:
ADDITIONAL INFO
Smart host filter docs: https://docs.ansible.com/ansible-tower/latest/html/userguide/inventories.html#smart-host-filter Initial host filter lookup PR: https://github.com/ansible/awx/pull/7644
Host filter lookup mockup: https://tower-mockups.testing.ansible.com/patternfly/inventories/inventories-smart-edit-filter/
Image below is a mockup of what it could put in the host filter lookup or advanced search