diff options
Diffstat (limited to 'lib/ansible/plugins/doc_fragments/return_common.py')
-rw-r--r-- | lib/ansible/plugins/doc_fragments/return_common.py | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/lib/ansible/plugins/doc_fragments/return_common.py b/lib/ansible/plugins/doc_fragments/return_common.py new file mode 100644 index 0000000..6f54288 --- /dev/null +++ b/lib/ansible/plugins/doc_fragments/return_common.py @@ -0,0 +1,42 @@ +# -*- coding: utf-8 -*- + +# Copyright: (c) 2016, Ansible, Inc +# 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 + + +class ModuleDocFragment(object): + # Standard documentation fragment + RETURN = r''' +changed: + description: Whether the module affected changes on the target. + returned: always + type: bool + sample: false +failed: + description: Whether the module failed to execute. + returned: always + type: bool + sample: true +msg: + description: Human-readable message. + returned: as needed + type: str + sample: all ok +skipped: + description: Whether the module was skipped. + returned: always + type: bool + sample: false +results: + description: List of module results, + returned: when using a loop. + type: list + sample: [{changed: True, msg: 'first item changed'}, {changed: False, msg: 'second item ok'}] +exception: + description: Optional information from a handled error. + returned: on some errors + type: str + sample: Unknown error +''' |