I'm new to ansible, but I cant find the answer to this question which I think looks fairly simple..
In playbooks, you can get facts in ansible using example {{ ansible_eth0["ipv4"]["address"] }}
or {{ ansible_eth0.ipv4.address }}
.
How can I grab the same information as an information-only command using something like ansible all -m setup -a "filter=???"
As filter
, I have tried both the syntaxes that you want to use in the playbooks, and some more exotic ones with combination of *
.
Is this even the right way to collect data like this?