True or false debug msg

All,

Probably a crummy subject line, but here’s what I’m trying to do: I want my debug message to return “file exists” or file doesn’t exist. Here’s my playbook, so far:

Hi,

You can use jinja2 template:

  - debug:
          msg: "File {% if file_info.stat.exists %}exists{% else %}doesn't exist{% endif %}."

More info:
http://jinja.pocoo.org/docs/templates/

Cheers,
Marko
CONFIDENTIALITY NOTICE: This message is the property of International Game Technology PLC and/or its subsidiaries and may contain proprietary, confidential or trade secret information. This message is intended solely for the use of the addressee. If you are not the intended recipient and have received this message in error, please delete this message from your system. Any unauthorized reading, distribution, copying, or other use of this message or its attachments is strictly prohibited.

Marko,

Perfect - thanks!

Dimitri