Debugging the task

Let's run the playbook and see what happens:

$ ansible-playbook playbook.yml

The first problem is that we are not passing a host inventory file, so there will be warnings that only the localhost is available; this is fine, as we want to run the say module only on our Ansible Controller anyway:

[WARNING]: Unable to parse /etc/ansible/hosts as an inventory source[WARNING]: No inventory was parsed, only implicit localhost is available[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicitlocalhost does not match 'all'

Next, Ansible runs the play itself; this should result in a fatal error:

PLAY [localhost] *********************************************************************************** ...

Get Learn Ansible now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.