knowledge/technology/tools/Ansible/modules/ansible.builtin.fail.md

626 B

ansible.builtin.fail

This module fails the progress with a custom message.

Parameter

Parameter Type Default Description
msg string "Failed as requested from task" The customized message used for failing execution.

Examples

- name: Example using fail and when together
  ansible.builtin.fail:
    msg: The system may not be provisioned according to the CMDB status.
  when: cmdb_status != "to-be-staged"