Ansible - fail module

If you are not familiar with modules, check out Ansible - Getting Started with Modules.

The fail module is used to cease execution of a playbook when a certain condition is met. In this example, the playbook will fail when the foo variable is undefined.

- name: fail when the 'foo' variable is undefined
    msg: the 'foo' variable is undefined
  when: foo is undefined


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 51602 in the box below so that we can be sure you are a human.


Web design by yours truely - me, myself, and I   |   |