Debian Codegraph @

ansible_collections/community/hrobot/plugins/doc_fragments/attributes.py

raw
1 # -*- coding: utf-8 -*-
2
3 # Copyright (c) Ansible Project
4 # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
5 # SPDX-License-Identifier: GPL-3.0-or-later
6
7 from __future__ import (absolute_import, division, print_function)
8 __metaclass__ = type
9
10
11 class ModuleDocFragment(object):
12
13 # Standard documentation fragment
14 DOCUMENTATION = r"""
15 options: {}
16 attributes:
17 check_mode:
18 description: Can run in C(check_mode) and return changed status prediction without modifying target.
19 diff_mode:
20 description: Will return details on what has changed (or possibly needs changing in C(check_mode)), when in diff mode.
21 idempotent:
22 description:
23 - When run twice in a row outside check mode, with the same arguments, the second invocation indicates no change.
24 - This assumes that the system controlled/queried by the module has not changed in a relevant way.
25 """
26
27 # Should be used together with the standard fragment
28 IDEMPOTENT_NOT_MODIFY_STATE = r"""
29 options: {}
30 attributes:
31 idempotent:
32 support: full
33 details:
34 - This action does not modify state.
35 """
36
37 # Should be used together with the standard fragment
38 INFO_MODULE = r'''
39 options: {}
40 attributes:
41 check_mode:
42 support: full
43 details:
44 - This action does not modify state.
45 diff_mode:
46 support: N/A
47 details:
48 - This action does not modify state.
49 '''
50
51 ACTIONGROUP_ROBOT = r'''
52 options: {}
53 attributes:
54 action_group:
55 description: Use C(group/community.hrobot.robot) in C(module_defaults) to set defaults for this module.
56 support: full
57 membership:
58 - community.hrobot.robot
59 '''
60
61 ACTIONGROUP_API = r'''
62 options: {}
63 attributes:
64 action_group:
65 description: Use C(group/community.hrobot.api) in C(module_defaults) to set defaults for this module.
66 support: full
67 membership:
68 - community.hrobot.api
69 '''
70
71 # Only for transition period
72 _ACTIONGROUP_ROBOT_AND_API = r'''
73 options: {}
74 attributes:
75 action_group:
76 description: Use C(group/community.hrobot.robot) or C(group/community.hrobot.api) in C(module_defaults) to set defaults for this module.
77 support: full
78 membership:
79 - community.hrobot.api
80 - community.hrobot.robot
81 '''
82
83 # Only for transition period
84 _ACTIONGROUP_ROBOT_AND_API_DEPRECATION = r'''
85 options: {}
86 attributes:
87 action_group:
88 description:
89 - Use C(group/community.hrobot.robot) or C(group/community.hrobot.api) in C(module_defaults) to set defaults for this module.
90 - The C(group/community.hrobot.robot) group is B(deprecated) for this module; the module will be removed from the group in community.hrobot 3.0.0.
91 support: full
92 membership:
93 - community.hrobot.api
94 - community.hrobot.robot
95 '''
96
97 CONN = r"""
98 options: {}
99 attributes:
100 become:
101 description: Is usable alongside C(become) keywords.
102 connection:
103 description: Uses the target's configured connection information to execute code on it.
104 delegation:
105 description: Can be used in conjunction with C(delegate_to) and related keywords.
106 """
107
108 FACTS = r"""
109 options: {}
110 attributes:
111 facts:
112 description: Action returns an C(ansible_facts) dictionary that will update existing host facts.
113 """
114
115 # Should be used together with the standard fragment and the FACTS fragment
116 FACTS_MODULE = r'''
117 options: {}
118 attributes:
119 check_mode:
120 support: full
121 details:
122 - This action does not modify state.
123 diff_mode:
124 support: N/A
125 details:
126 - This action does not modify state.
127 facts:
128 support: full
129 '''
130
131 FILES = r"""
132 options: {}
133 attributes:
134 safe_file_operations:
135 description: Uses Ansible's strict file operation functions to ensure proper permissions and avoid data corruption.
136 """
137
138 FLOW = r"""
139 options: {}
140 attributes:
141 action:
142 description: Indicates this has a corresponding action plugin so some parts of the options can be executed on the controller.
143 async:
144 description: Supports being used with the C(async) keyword.
145 """