title: Ansible: how to get output to display
body: <p>I have the following playbook, <a href="https://i.stack.imgur.com/5IIAT.png" rel="noreferrer">Playbook with output</a></p>
  
  <p>There are currently no errors and it runs fine. However, it does not display the output to the console. I have come across this with other playbooks and got around it by adding the following task to the playbook:</p>
  
  <pre><code>-debug: var=output.stdout_lines
  </code></pre>
  
  <p>and it prints the output. However, I tried to do the same thing in the
  above playbook and it says that the variable was undefined (code not
  shown because it didn't work).</p>
  
  <p>Is anyone aware of a better way to get the output to print to the console without using <code>-debug</code>? Any ansible references would be greatly appreciated.</p>