ANSIBLE.DEBUG(3)

NAME
debug - Print statements during execution

DESCRIPTION

This module prints statements during execution and can be useful for debugging variables or expressions without necessarily halting the playbook. Useful for debugging together with the only_if directive. In order to see the debug message, you need to run ansible in verbose mode (using the -v option).

OPTIONS

fail
    A boolean that indicates whether the debug module should fail or not. Choices: yes,no. (default: no)

msg The customized message that is printed. If omitted, prints a generic message. (default: Hello world!)."

EXAMPLES

Example that prints the loopback address and gateway for each host
- action: debug msg="System $inventory_hostname has uuid $ansible_product_uuid"
- action: debug msg="System $inventory_hostname lacks a gateway" fail=yes
  only_if: "is_unset('${ansible_default_ipv4.gateway}')"
- action: debug msg="System $inventory_hostname has gateway ${ansible_default_ipv4.gateway}"
  only_if: "is_set('${ansible_default_ipv4.gateway}')"
None

AUTHOR
Dag Wieers

SEE ALSO
ansible(1), http://ansible.github.com/modules.html#debug