The ansible -t option for ansible-playbook

35 views
Skip to first unread message

Rick Romanus

unread,
Dec 8, 2015, 2:48:46 PM12/8/15
to Ansible Project
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!

Brian Coca

unread,
Dec 8, 2015, 3:03:31 PM12/8/15
to Ansible Project
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

--------------
Brian Coca
Reply all
Reply to author
Forward
0 new messages