# The ansible -t option for ansible-playbook

**URL:** <https://forum.ansible.com/t/the-ansible-t-option-for-ansible-playbook/19966>\
**Category:** Ansible Project\
**Created:** [December 8, 2015, 7:29pm UTC](https://forum.ansible.com/t/the-ansible-t-option-for-ansible-playbook/19966 "2015-12-08T19:29:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rick\_Romanus](https://avatars.discourse-cdn.com/v4/letter/r/779978/32.png) [@Rick\_Romanus](https://forum.ansible.com/u/Rick_Romanus)\
**Post date:** [December 8, 2015, 7:29pm UTC](https://forum.ansible.com/t/the-ansible-t-option-for-ansible-playbook/19966/1 "2015-12-08T19:29:18Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [December 8, 2015, 8:03pm UTC](https://forum.ansible.com/t/the-ansible-t-option-for-ansible-playbook/19966/2 "2015-12-08T20:03:23Z")

</div>

you can use in 2.0 if you just whitelist the 'tree' callback, though  
you cannot configure the output dir.

ansible.cfg:  
callback\_whitelist = tree
