How do I pretty print an object in ansible?

Question:

I want to pretty print a registered object in ansible to help with debugging. How do I do it?

Answer:

You need to use with_dict and var= in your debug statement:

Leave a Reply