2022-11-06 20:10:56 +00:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
|
|
|
# Copyright (c) Ansible Project
|
|
|
|
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
|
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
|
|
|
|
from __future__ import (absolute_import, division, print_function)
|
|
|
|
__metaclass__ = type
|
|
|
|
|
|
|
|
|
|
|
|
class ModuleDocFragment(object):
|
|
|
|
|
|
|
|
# Standard documentation fragment
|
2024-12-28 16:00:28 +00:00
|
|
|
DOCUMENTATION = r"""
|
2022-11-06 20:10:56 +00:00
|
|
|
options: {}
|
|
|
|
attributes:
|
2024-12-28 16:00:28 +00:00
|
|
|
check_mode:
|
|
|
|
description: Can run in C(check_mode) and return changed status prediction without modifying target.
|
|
|
|
diff_mode:
|
|
|
|
description: Will return details on what has changed (or possibly needs changing in C(check_mode)), when in diff mode.
|
2024-12-30 20:11:12 +00:00
|
|
|
idempotent:
|
|
|
|
description:
|
|
|
|
- When run twice in a row outside check mode, with the same arguments, the second invocation indicates no change.
|
|
|
|
- This assumes that the system controlled/queried by the module has not changed in a relevant way.
|
|
|
|
"""
|
|
|
|
|
|
|
|
# Should be used together with the standard fragment
|
|
|
|
IDEMPOTENT_NOT_MODIFY_STATE = r"""
|
|
|
|
options: {}
|
|
|
|
attributes:
|
|
|
|
idempotent:
|
|
|
|
support: full
|
|
|
|
details:
|
|
|
|
- This action does not modify state.
|
2024-12-28 16:00:28 +00:00
|
|
|
"""
|
2022-11-06 20:10:56 +00:00
|
|
|
|
|
|
|
# Should be used together with the standard fragment
|
|
|
|
INFO_MODULE = r'''
|
|
|
|
options: {}
|
|
|
|
attributes:
|
2024-12-29 14:47:51 +00:00
|
|
|
check_mode:
|
|
|
|
support: full
|
|
|
|
details:
|
|
|
|
- This action does not modify state.
|
|
|
|
diff_mode:
|
|
|
|
support: N/A
|
|
|
|
details:
|
|
|
|
- This action does not modify state.
|
2022-11-06 20:10:56 +00:00
|
|
|
'''
|
|
|
|
|
|
|
|
ACTIONGROUP_ACME = r'''
|
|
|
|
options: {}
|
|
|
|
attributes:
|
2024-12-29 14:47:51 +00:00
|
|
|
action_group:
|
|
|
|
description: Use C(group/acme) or C(group/community.crypto.acme) in C(module_defaults) to set defaults for this module.
|
|
|
|
support: full
|
|
|
|
membership:
|
|
|
|
- community.crypto.acme
|
|
|
|
- acme
|
2022-11-06 20:10:56 +00:00
|
|
|
'''
|
|
|
|
|
2024-12-28 16:00:28 +00:00
|
|
|
FACTS = r"""
|
2022-11-06 20:10:56 +00:00
|
|
|
options: {}
|
|
|
|
attributes:
|
2024-12-28 16:00:28 +00:00
|
|
|
facts:
|
|
|
|
description: Action returns an C(ansible_facts) dictionary that will update existing host facts.
|
|
|
|
"""
|
2022-11-06 20:10:56 +00:00
|
|
|
|
|
|
|
# Should be used together with the standard fragment and the FACTS fragment
|
|
|
|
FACTS_MODULE = r'''
|
|
|
|
options: {}
|
|
|
|
attributes:
|
2024-12-29 14:47:51 +00:00
|
|
|
check_mode:
|
|
|
|
support: full
|
|
|
|
details:
|
|
|
|
- This action does not modify state.
|
|
|
|
diff_mode:
|
|
|
|
support: N/A
|
|
|
|
details:
|
|
|
|
- This action does not modify state.
|
|
|
|
facts:
|
|
|
|
support: full
|
2022-11-06 20:10:56 +00:00
|
|
|
'''
|
|
|
|
|
2024-12-28 16:00:28 +00:00
|
|
|
FILES = r"""
|
2022-11-06 20:10:56 +00:00
|
|
|
options: {}
|
|
|
|
attributes:
|
2024-12-28 16:00:28 +00:00
|
|
|
safe_file_operations:
|
|
|
|
description: Uses Ansible's strict file operation functions to ensure proper permissions and avoid data corruption.
|
|
|
|
"""
|
2022-11-06 20:10:56 +00:00
|
|
|
|
2024-12-28 16:00:28 +00:00
|
|
|
FLOW = r"""
|
2022-11-06 20:10:56 +00:00
|
|
|
options: {}
|
|
|
|
attributes:
|
2024-12-28 16:00:28 +00:00
|
|
|
action:
|
|
|
|
description: Indicates this has a corresponding action plugin so some parts of the options can be executed on the controller.
|
|
|
|
async:
|
|
|
|
description: Supports being used with the C(async) keyword.
|
|
|
|
"""
|