remove common return values from docs (#10485)

* remove common return values from docs

* pacman: add note about version added of RV
This commit is contained in:
Alexei Znamensky 2025-07-29 04:46:02 +12:00 committed by GitHub
commit 15d3ea123d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
28 changed files with 3 additions and 265 deletions

View file

@ -165,16 +165,6 @@ EXAMPLES = r"""
state: absent state: absent
""" """
RETURN = r"""
changed:
description: Return changed for aix_filesystems actions as true or false.
returned: always
type: bool
msg:
description: Return message regarding the action.
returned: always
type: str
"""
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule
from ansible_collections.community.general.plugins.module_utils._mount import ismount from ansible_collections.community.general.plugins.module_utils._mount import ismount

View file

@ -112,16 +112,6 @@ name:
returned: always returned: always
type: str type: str
sample: startmyservice sample: startmyservice
msg:
description: Action done with the C(inittab) entry.
returned: changed
type: str
sample: changed inittab entry startmyservice
changed:
description: Whether the C(inittab) changed or not.
returned: always
type: bool
sample: true
""" """
# Import necessary libraries # Import necessary libraries

View file

@ -113,22 +113,6 @@ result:
description: Message about action taken. description: Message about action taken.
returned: always returned: always
type: str type: str
warnings:
description: List of warning messages.
returned: when needed
type: list
rc:
description: Return code of underlying command.
returned: failed
type: int
stdout:
description: The stdout of underlying command.
returned: failed
type: str
stderr:
description: The stderr of underlying command.
returned: failed
type: str
""" """
import re import re

View file

@ -95,14 +95,6 @@ EXAMPLES = r"""
api_secret: "{{ api_secret }}" api_secret: "{{ api_secret }}"
""" """
RETURN = r"""
changed:
description: Whether the API accepted the message.
returned: always
type: bool
sample: true
"""
import json import json

View file

@ -112,26 +112,6 @@ command:
returned: When a flatpak command has been executed returned: When a flatpak command has been executed
type: str type: str
sample: "/usr/bin/flatpak remote-add --system flatpak-test https://dl.flathub.org/repo/flathub.flatpakrepo" sample: "/usr/bin/flatpak remote-add --system flatpak-test https://dl.flathub.org/repo/flathub.flatpakrepo"
msg:
description: Module error message.
returned: failure
type: str
sample: "Executable '/usr/local/bin/flatpak' was not found on the system."
rc:
description: Return code from flatpak binary.
returned: When a flatpak command has been executed
type: int
sample: 0
stderr:
description: Error output from flatpak binary.
returned: When a flatpak command has been executed
type: str
sample: "error: GPG verification enabled, but no summary found (check that the configured URL in remote config is correct)\n"
stdout:
description: Output from flatpak binary.
returned: When a flatpak command has been executed
type: str
sample: "flathub\tFlathub\thttps://dl.flathub.org/repo/\t1\t\n"
""" """
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule

View file

@ -61,18 +61,6 @@ handler:
returned: success returned: success
type: str type: str
sample: google-chrome.desktop sample: google-chrome.desktop
stdout:
description:
- The output of the C(gio) command.
returned: success
type: str
sample: Set google-chrome.desktop as the default for x-scheme-handler/https
stderr:
description:
- The error output of the C(gio) command.
returned: failure
type: str
sample: 'gio: Failed to load info for handler "never-existed.desktop"'
version: version:
description: Version of gio. description: Version of gio.
type: str type: str

View file

@ -197,18 +197,6 @@ EXAMPLES = r"""
""" """
RETURN = r""" RETURN = r"""
msg:
description: Output from stdout of keytool command after execution of given command.
returned: success
type: str
sample: "Module require existing keystore at keystore_path '/tmp/test/cacerts'"
rc:
description: Keytool command execution return value.
returned: success
type: int
sample: "0"
cmd: cmd:
description: Executed command to get action done. description: Executed command to get action done.
returned: success returned: success

View file

@ -166,24 +166,12 @@ EXAMPLES = r"""
""" """
RETURN = r""" RETURN = r"""
msg:
description: Output from stdout of keytool/openssl command after execution of given command or an error.
returned: changed and failure
type: str
sample: "Unable to find the current certificate fingerprint in ..."
err: err:
description: Output from stderr of keytool/openssl command after error of given command. description: Output from stderr of keytool/openssl command after error of given command.
returned: failure returned: failure
type: str type: str
sample: "Keystore password is too short - must be at least 6 characters\n" sample: "Keystore password is too short - must be at least 6 characters\n"
rc:
description: Keytool/openssl command execution return value.
returned: changed and failure
type: int
sample: "0"
cmd: cmd:
description: Executed command to get action done. description: Executed command to get action done.
returned: changed and failure returned: changed and failure

View file

@ -332,11 +332,6 @@ EXAMPLES = r"""
""" """
RETURN = r""" RETURN = r"""
msg:
description: Message as to what action was taken.
returned: always
type: str
sample: User f18c709c-03d6-11ee-970b-c74bf2721112 created
proposed: proposed:
description: Representation of the proposed user. description: Representation of the proposed user.
returned: on success returned: on success
@ -349,10 +344,6 @@ end_state:
description: Representation of the user after module execution. description: Representation of the user after module execution.
returned: on success returned: on success
type: dict type: dict
changed:
description: Return V(true) if the operation changed the user on the keycloak server, V(false) otherwise.
returned: always
type: bool
""" """
from ansible_collections.community.general.plugins.module_utils.identity.keycloak.keycloak import KeycloakAPI, camel, \ from ansible_collections.community.general.plugins.module_utils.identity.keycloak.keycloak import KeycloakAPI, camel, \

View file

@ -109,14 +109,6 @@ timeout:
description: The timeout for plugin download. description: The timeout for plugin download.
returned: success returned: success
type: str type: str
stdout:
description: The command stdout.
returned: success
type: str
stderr:
description: The command stderr.
returned: success
type: str
state: state:
description: The state for the managed plugin. description: The state for the managed plugin.
returned: success returned: success

View file

@ -91,6 +91,7 @@ EXAMPLES = r"""
register: ldap_group_gids register: ldap_group_gids
""" """
# @FIXME RV 'results' is meant to be used when 'loop:' was used with the module.
RESULTS = r""" RESULTS = r"""
results: results:
description: description:

View file

@ -96,10 +96,6 @@ EXAMPLES = r"""
""" """
RETURN = r""" RETURN = r"""
changed:
description: Return changed for mksysb actions as true or false.
returned: always
type: bool
msg: msg:
description: Return message regarding the action. description: Return message regarding the action.
returned: always returned: always

View file

@ -144,10 +144,6 @@ EXAMPLES = r"""
""" """
RETURN = r""" RETURN = r"""
changed:
description: If module has modified record.
returned: success
type: str
record: record:
description: DNS record. description: DNS record.
returned: success returned: success

View file

@ -66,6 +66,7 @@ EXAMPLES = r"""
changed_when: false changed_when: false
""" """
# @FIXME RV 'results' is meant to be used when 'loop:' was used with the module.
RETURN = r""" RETURN = r"""
results: results:
description: List of lists of strings containing selected rows, likely empty for DDL statements. description: List of lists of strings containing selected rows, likely empty for DDL statements.

View file

@ -258,12 +258,6 @@ EXAMPLES = r"""
""" """
RETURN = r""" RETURN = r"""
changed:
description: True if a device was altered in any way (created, modified or removed).
type: bool
sample: true
returned: success
devices: devices:
description: Information about each device that was processed. description: Information about each device that was processed.
type: list type: list

View file

@ -123,12 +123,6 @@ EXAMPLES = r"""
""" """
RETURN = r""" RETURN = r"""
changed:
description: True if an IP address assignments were altered in any way (created or removed).
type: bool
sample: true
returned: success
device_id: device_id:
type: str type: str
description: UUID of the device associated with the specified IP address. description: UUID of the device associated with the specified IP address.

View file

@ -110,12 +110,6 @@ EXAMPLES = r"""
""" """
RETURN = r""" RETURN = r"""
changed:
description: True if a project was created or removed.
type: bool
sample: true
returned: success
name: name:
description: Name of addressed project. description: Name of addressed project.
type: str type: str

View file

@ -85,11 +85,6 @@ EXAMPLES = r"""
""" """
RETURN = r""" RETURN = r"""
changed:
description: True if a sshkey was created or removed.
type: bool
sample: true
returned: always
sshkeys: sshkeys:
description: Information about sshkeys that were created/removed. description: Information about sshkeys that were created/removed.
type: list type: list

View file

@ -129,6 +129,7 @@ notes:
build user with permissions to install packages could be necessary. build user with permissions to install packages could be necessary.
- 'In the tests, while using C(yay) as the O(executable) option, the module failed to install AUR packages with the error: - 'In the tests, while using C(yay) as the O(executable) option, the module failed to install AUR packages with the error:
C(error: target not found: <pkg>).' C(error: target not found: <pkg>).'
- The common return values `stdout` and `stderr` are returned upon success, when needed, since community.general 4.1.0.
""" """
RETURN = r""" RETURN = r"""
@ -151,22 +152,6 @@ cache_updated:
type: bool type: bool
sample: false sample: false
version_added: 4.6.0 version_added: 4.6.0
stdout:
description:
- Output from pacman.
returned: success, when needed
type: str
sample: ":: Synchronizing package databases... core is up to date :: Starting full system upgrade..."
version_added: 4.1.0
stderr:
description:
- Error output from pacman.
returned: success, when needed
type: str
sample: "warning: libtool: local (2.4.6+44+gb9b44533-14) is newer than core (2.4.6+42+gb88cebd5-15)\nwarning ..."
version_added: 4.1.0
""" """
EXAMPLES = r""" EXAMPLES = r"""

View file

@ -159,13 +159,6 @@ EXAMPLES = r"""
delegate_to: localhost delegate_to: localhost
""" """
RETURN = r"""
changed:
description: A flag indicating if any change was made or not.
returned: success
type: bool
sample: false
"""
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.urls import fetch_url from ansible.module_utils.urls import fetch_url

View file

@ -82,16 +82,6 @@ EXAMPLES = r"""
""" """
RETURN = r""" RETURN = r"""
rc:
description: Return code of rpm-ostree command.
returned: always
type: int
sample: 0
changed:
description: State changes.
returned: always
type: bool
sample: true
action: action:
description: Action performed. description: Action performed.
returned: always returned: always
@ -102,16 +92,6 @@ packages:
returned: always returned: always
type: list type: list
sample: ["nfs-utils"] sample: ["nfs-utils"]
stdout:
description: Stdout of rpm-ostree command.
returned: always
type: str
sample: 'Staging deployment...done\n...'
stderr:
description: Stderr of rpm-ostree command.
returned: always
type: str
sample: ''
cmd: cmd:
description: Full command used for performed action. description: Full command used for performed action.
returned: always returned: always

View file

@ -96,16 +96,6 @@ EXAMPLES = r"""
manifest: 12920 manifest: 12920
""" """
RETURN = r"""
stdout:
description: C(stdout) of C(swupd).
returned: always
type: str
stderr:
description: C(stderr) of C(swupd).
returned: always
type: str
"""
import os import os
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule

View file

@ -59,20 +59,6 @@ EXAMPLES = r"""
""" """
RETURN = r""" RETURN = r"""
rc:
description: The command return code (0 means success).
returned: always
type: int
stdout:
description: C(syspatch) standard output.
returned: always
type: str
sample: "001_rip6cksum"
stderr:
description: C(syspatch) standard error.
returned: always
type: str
sample: "syspatch: need root privileges"
reboot_needed: reboot_needed:
description: Whether or not a reboot is required after an update. description: Whether or not a reboot is required after an update.
returned: always returned: always

View file

@ -94,13 +94,6 @@ EXAMPLES = r"""
jail: testjail jail: testjail
""" """
RETURN = r"""
changed:
description: Return changed for sysrc actions.
returned: always
type: bool
sample: true
"""
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule
import re import re

View file

@ -78,21 +78,6 @@ EXAMPLES = r"""
ignore_errors: true ignore_errors: true
""" """
RETURN = r"""
rc:
description: The command return code (0 means success).
returned: always
type: int
stdout:
description: Sysupgrade standard output.
returned: always
type: str
stderr:
description: Sysupgrade standard error.
returned: always
type: str
sample: "sysupgrade: need root privileges"
"""
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule

View file

@ -272,11 +272,6 @@ outputs:
type: str type: str
returned: always returned: always
description: The value of the output as interpolated by Terraform. description: The value of the output as interpolated by Terraform.
stdout:
type: str
description: Full C(terraform) command stdout, in case you want to display it or examine the event log.
returned: always
sample: ''
command: command:
type: str type: str
description: Full C(terraform) command built by this module, in case you want to re-run the command outside the module or description: Full C(terraform) command built by this module, in case you want to re-run the command outside the module or

View file

@ -57,20 +57,6 @@ author:
- Indrajit Raychaudhuri (@indrajitr) - Indrajit Raychaudhuri (@indrajitr)
""" """
RETURN = r"""
diff:
description: The differences about the given arguments.
returned: success
type: complex
contains:
before:
description: The values before change.
type: dict
after:
description: The values after change.
type: dict
"""
EXAMPLES = r""" EXAMPLES = r"""
- name: Set timezone to Asia/Tokyo - name: Set timezone to Asia/Tokyo
become: true become: true

View file

@ -342,11 +342,6 @@ actions:
], ],
"state": "present" "state": "present"
} }
backup_file:
description: The name of the backup file that was created.
type: str
returned: when O(backup=true)
sample: /path/to/file.xml.1942.2017-08-24@14:16:01~
count: count:
description: The count of xpath matches. description: The count of xpath matches.
type: int type: int
@ -356,10 +351,6 @@ matches:
description: The xpath matches found. description: The xpath matches found.
type: list type: list
returned: when parameter O(print_match) is set returned: when parameter O(print_match) is set
msg:
description: A message related to the performed action(s).
type: str
returned: always
xmlstring: xmlstring:
description: An XML string of the resulting output. description: An XML string of the resulting output.
type: str type: str