How can I debug my inventory? I need something like: ansible-playbook -i staging/ --list-vars

20 views
Skip to first unread message

Stéphane Klein

unread,
Oct 28, 2016, 9:40:04 AM10/28/16
to Ansible Project
Hi,

I try to refactor my inventory files, how can I test / debug / check my inventory?

I need something like: ansible-playbook -i staging/ --list-vars

Best regards,
Stéphane

Kai Stian Olstad

unread,
Oct 28, 2016, 10:23:10 AM10/28/16
to ansible...@googlegroups.com
On 28. okt. 2016 11:15, Stéphane Klein wrote:
> I try to refactor my inventory files, how can I test / debug / check my
> inventory?
>
> I need something like: ansible-playbook -i staging/ --list-vars

Maybe "ansible -i staging/ -m debug -a var=vars"

In var= you can use vars, hostvars, groups, group_names and environment
to get different information.


--
Kai Stian Olstad
Reply all
Reply to author
Forward
0 new messages