Ansible troubleshooting — undefined variable

How to reproduce the `undefined variable` error in Ansible, troubleshooting, and fix to be able to successfully print the value of a variable on screen.