How can i print all the Host facts including custom facts in a Playbook?

I want to print all the hosts’ facts (including the custom facts set on these hosts) in a playbook. The reason i want all the details in playbook is that i want to create a report in Splunk but AWX sends separate events for each task because of which it becomes difficult to target a single event or type of event which includes all the host details. I have checked few methods like setup: but have been also reading the comments that it doesn’t dump all the host facts including the custom facts. Can anyone please suggest how to can i get ALL the facts printed in a single task?

perhaps running "setup" module with high verbosity?

can’t remember where I got this from, someone posted it before, you can use a template and add something like the following in your template file:
`
Module Variables (“vars”):

Thanks Adam. I will try this. Wanted to check if this also prints the custom facts set on hosts?

Yes, they will be there in the “vars” section, search for “ansible_local”