I have an inventory of about 10 hosts. On all I want to check if a specific file exists. So I do:
ansible -m stat -a 'path=/the/file' all
And then I get a load of output because on most servers this file does actually exist.
But I only care for stat.exists
for each host.
Is there any possibility of displaying only a specific entry of the result set per host?
And I do not want to use a playbook. This is specifically for ad-hoc queries.