ansible.fail(3) - Linux man page

Name

fail - Fail with custom message

Description

This module fails the progress with a custom message. It can be useful for bailing out when a certain condition is met using only_if.

Options

msg

The customized message used for failing execution. If omitted, fail will simple bail out with a generic message. (default: 'Failed as requested from task')."

Examples

Example playbook using fail and only_if together

fail: msg="The system may not be provisioned according to the CMDB status."
    only_if: "'$cmdb_status' != 'to-be-staged'"

Author

Dag Wieers

See Also

ansible(1), http://ansible.github.com/modules.html#fail