How can I print an object out of reach?

I want to print a registered object inaccessible for debugging assistance. How to do it?

+4
source share
2 answers

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

- tasks: 
  - name: build web node
    nova_compute:
    arguments: xyz
    register: os_web_node
  - debug: var={{ item }}
    with_dict: os_web_node
+4
source

You also have to_nice_yaml, andto_nice_json if you want to control the format itself. More details here .

+7
source

All Articles