Hi,
Anybody know how to use options in playbooks.
The following command works fine:
ansible test -m setup --tree /home/user/ansible/facts
How do I use this in a playbook:
Hi,
Anybody know how to use options in playbooks.
The following command works fine:
ansible test -m setup --tree /home/user/ansible/facts
How do I use this in a playbook:
Thanks for the reply Rhys,
I tried:
ansible-playbook test.yml --extra-vars “–tree /home/user/ansible/facts”
ansible-playbook test.yml --extra-vars “tree /home/user/ansible/facts”
ansible-playbook test.yml --extra-vars “tree=/home/user/ansible/facts”
None work.
Have you tried printing it with the debug module? Paste your playbook here.
Playbook attached.
setup.yml (111 Bytes)
Playbook:
--tree is only an option for `ansible` .. not ansible-playbook, there
is no keyword to do the same in plays.
But since it is now a callback, you can however enabled it as you
would any other callback
https://github.com/ansible/ansible/blob/devel/docs/docsite/rst/plugins/callback.rst
Thanks Brian,
I’ll ask another way. How do I retrieve system information on servers without using the plugin ‘setup’?