summaryrefslogtreecommitdiffstats
path: root/lib/ansible/plugins/doc_fragments/return_common.py
blob: 6f542880502d372901cd5616c92b50ec7d4453d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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
'''