Hi,
Is it possible to use the setup module along with the filter parameter to return something based on the value of fact?
For example, I want to quickly get a list of all my machines in ansible that are VMWare based using an ad-hoc command. I can run the following to get the vendor;
ansible -i inventory all -m setup -a "filter=ansible_system_vendor" -o
10.0.XXX.XXX | success >> {"ansible_facts": {"ansible_system_vendor": "VMware, Inc."}, "changed": false}
10.0.XXX.XXX | success >> {"ansible_facts": {"ansible_system_vendor": "VMware, Inc."}, "changed": false}
10.0.XXX.XXX | success >> {"ansible_facts": {"ansible_system_vendor": "HP"}, "changed": false}
And I can pipe the result though grep to get what I need, but is there any way to quickly list all hosts by the value of a certain fact?
Thanks.