debug module

The module that prints a message or the value of a variable during a run and never changes anything.

In more detail

Give it msg with text, or var with a variable name to print that variable. It is the safest way to learn the shape of a playbook and to inspect facts and registered results. Avoid pointing it at secrets, because whatever it prints ends up in terminal output and logs.

Example

ansible.builtin.debug:
  var: ansible_facts.hostname

Related terms

Taught in

References

Certification courses