FreeKB - ansible-playbook command - printing output to the console (fail)
ansible-playbook command - printing output to the console (fail)

Home > Search


This assumes you have installed Ansible Tower and are familiar with the ansible-playbook command.

The "fail" option can be used to print failure output to the console. In this example, "Hello World" will be printed. fail must occur inside of tasks.

tasks:
  - fail: msg="Hello World"

 

When the play is run, the following should be produced.

TASK [fail]
fatal: [server1.example.com]: FAILED => {"changed": false, "msg": "Hello World"}

 



Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.




Please enter ad24f in the box below so that we can be sure you are a human.




Comments