utilities: Clean up parameter types and add seealso (#53063)

* utilities: Clean up parameter types and add seealso

* Add inventory modules

* Add more references, clarify with-loops
This commit is contained in:
Dag Wieers 2019-03-07 00:25:59 +01:00 committed by GitHub
parent 77a03af394
commit f47191674e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 468 additions and 321 deletions

View file

@ -1,43 +1,45 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright 2012 Dag Wieers <dag@wieers.com>
# Copyright: (c) 2012, Dag Wieers <dag@wieers.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['stableinterface'],
'supported_by': 'core'}
DOCUMENTATION = '''
DOCUMENTATION = r'''
---
module: fail
short_description: 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 C(when).
- This module is also supported for Windows targets.
- This module fails the progress with a custom message.
- It can be useful for bailing out when a certain condition is met using C(when).
- This module is also supported for Windows targets.
version_added: "0.8"
options:
msg:
description:
- The customized message used for failing execution. If omitted,
fail will simply bail out with a generic message.
required: false
default: "'Failed as requested from task'"
- The customized message used for failing execution.
- If omitted, fail will simply bail out with a generic message.
type: str
default: Failed as requested from task
notes:
- This module is also supported for Windows targets.
author: "Dag Wieers (@dagwieers)"
seealso:
- module: assert
- module: debug
- module: meta
author:
- Dag Wieers (@dagwieers)
'''
EXAMPLES = '''
EXAMPLES = r'''
# Example playbook using fail and when together
- fail:
msg: "The system may not be provisioned according to the CMDB status."
msg: The system may not be provisioned according to the CMDB status.
when: cmdb_status != "to-be-staged"
'''