I know I can script this, but I am wondering if there is a way via ansible to basically grab the contents of a file on a remote server, format it, and write it to a local file? For example, I want to gather all users/groups listed in the sudoers file, and format it as such:
DATE:
ServerA
root
userA
ServerB
…
ServerC
root
userA
%GroupA
I am not concerned about the regexp needed, mostly I am wanting to grab data, format it as above, and append contents to a file