I’m trying to gather file stats of the sudoers file from a list of hosts and put the the stats in individual files on the local machine.
I found doing this with the ansible command is fairly easy…
ansible all -i hosts -u root -k -m stat -a “path=/etc/sudoers” -t /home/rromanu/LOG/FileInfo
However I have been struggling to find the best way to do this in an ansible playbook.
Any and all advice would be greatly appreciated.
Thank You in advance!