mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-01 16:23:10 +00:00
35 lines
1.1 KiB
JSON
35 lines
1.1 KiB
JSON
{
|
|
"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."
|
|
],
|
|
"module": "fail",
|
|
"examples": [
|
|
{
|
|
"code": "action: fail msg=\"The system may not be provisioned according to the CMDB status.\" rc=100\nonly_if: \"'$cmdb_status' != 'to-be-staged'\"\n",
|
|
"description": "Example playbook using fail and only_if together"
|
|
}
|
|
],
|
|
"docuri": "fail",
|
|
"author": "Dag Wieers",
|
|
"filename": "library/fail",
|
|
"version_added": "0.8",
|
|
"short_description": "Fail with custom message",
|
|
"now_date": "2012-10-09",
|
|
"options": {
|
|
"msg": {
|
|
"default": "'Failed because only_if condition is true'",
|
|
"required": false,
|
|
"description": [
|
|
"The customized message used for failing execution. If ommited, fail will simple bail out with a generic message."
|
|
]
|
|
},
|
|
"rc": {
|
|
"default": 1,
|
|
"required": false,
|
|
"description": [
|
|
"The return code of the failure. This is currently not used by Ansible, but might be used in the future."
|
|
]
|
|
}
|
|
},
|
|
"ansible_version": "0.8"
|
|
} |