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:
1 2 3 4 5 6 7 8 |
- tasks: - name: build web node nova_compute: arguments: xyz register: os_web_node - debug: var={{ item }} with_dict: os_web_node |