How to use --tree in ansible playbook

1,871 views
Skip to first unread message

Stefan Mijatovic

unread,
May 23, 2014, 10:40:36 AM5/23/14
to ansible...@googlegroups.com
Hello,

I am discovering ansible and i was wondering how to specify a command in my playbook to use the "--tree" command that is normally used like this :

ansible all -m setup -u root --tree /tmp/ansible/general

Translating this into a playbook would look like :

---
- hosts: all
  remote_user: root
  tasks:
  - name: Gather our facts
    action: setup


But in the playbook i can't see how to specify the --tree arguent since if i put arguments to the 'action' it will correspond as the module arguments.

Thanks for your help !


Michael DeHaan

unread,
May 25, 2014, 4:46:19 PM5/25/14
to ansible...@googlegroups.com
I don't think many people are using the "--tree" command and with ansible-playbook it would be very very hard to keep the task order and understand this with multiple playbook runs.

Good options for you include Ansible Tower (built in logging, and RESTful access to all of the history) as well as writing a callback plugin - though you'd have to find a filesystem structure that worked for you.




--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/dc12c5f3-8367-487d-95ae-26411199a856%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages