[PR #9421/2a2a9661 backport][stable-10] [ab]*.py: normalize docs (#9427)

[ab]*.py: normalize docs (#9421)

* [ab]*.py: normalize docs

* Update plugins/modules/atomic_image.py

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 2a2a9661d9)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
patchback[bot] 2024-12-27 14:52:29 +01:00 committed by GitHub
parent 3db0a11148
commit 14038511a1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
36 changed files with 1931 additions and 2013 deletions

View file

@ -9,14 +9,13 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type
DOCUMENTATION = r'''
---
DOCUMENTATION = r"""
module: android_sdk
short_description: Manages Android SDK packages
description:
- Manages Android SDK packages.
- Allows installation from different channels (stable, beta, dev, canary).
- Allows installation of packages to a non-default SDK root directory.
- Manages Android SDK packages.
- Allows installation from different channels (stable, beta, dev, canary).
- Allows installation of packages to a non-default SDK root directory.
author: Stanislav Shamilov (@shamilovstas)
extends_documentation_fragment:
- community.general.attributes
@ -29,8 +28,8 @@ version_added: 10.2.0
options:
accept_licenses:
description:
- If this is set to B(true), the module will try to accept license prompts generated by C(sdkmanager) during
package installation. Otherwise, every license prompt will be rejected.
- If this is set to V(true), the module will try to accept license prompts generated by C(sdkmanager) during package
installation. Otherwise, every license prompt will be rejected.
type: bool
default: false
name:
@ -50,8 +49,8 @@ options:
type: str
sdk_root:
description:
- Provides path for an alternative directory to install Android SDK packages to. By default, all packages
are installed to the directory where C(sdkmanager) is installed.
- Provides path for an alternative directory to install Android SDK packages to. By default, all packages are installed
to the directory where C(sdkmanager) is installed.
type: path
channel:
description:
@ -63,27 +62,25 @@ requirements:
- C(java) >= 17
- C(sdkmanager) Command line tool for installing Android SDK packages.
notes:
- For some of the packages installed by C(sdkmanager) is it necessary to accept licenses. Usually it is done through
command line prompt in a form of a Y/N question when a licensed package is requested to be installed. If there are
several packages requested for installation and at least two of them belong to different licenses, the C(sdkmanager)
tool will prompt for these licenses in a loop.
In order to install packages, the module must be able to answer these license prompts. Currently, it is only
possible to answer one license prompt at a time, meaning that instead of installing multiple packages as a single
invocation of the C(sdkmanager --install) command, it will be done by executing the command independently for each
package. This makes sure that at most only one license prompt will need to be answered.
At the time of writing this module, a C(sdkmanager)'s package may belong to at most one license type that needs to
be accepted. However, if this is changes in the future, the module may hang as there might be more prompts generated
by the C(sdkmanager) tool which the module will not be able to answer. If this is the case, file an issue and in the
meantime, consider accepting all the licenses in advance, as it is described in the C(sdkmanager)
L(documentation,https://developer.android.com/tools/sdkmanager#accept-licenses), for instance, using the
M(ansible.builtin.command) module.
- For some of the packages installed by C(sdkmanager) is it necessary to accept licenses. Usually it is done through command
line prompt in a form of a Y/N question when a licensed package is requested to be installed. If there are several packages
requested for installation and at least two of them belong to different licenses, the C(sdkmanager) tool will prompt for
these licenses in a loop. In order to install packages, the module must be able to answer these license prompts. Currently,
it is only possible to answer one license prompt at a time, meaning that instead of installing multiple packages as a
single invocation of the C(sdkmanager --install) command, it will be done by executing the command independently for each
package. This makes sure that at most only one license prompt will need to be answered. At the time of writing this module,
a C(sdkmanager)'s package may belong to at most one license type that needs to be accepted. However, if this changes
in the future, the module may hang as there might be more prompts generated by the C(sdkmanager) tool which the module
will not be able to answer. If this becomes the case, file an issue and in the meantime, consider accepting all the licenses
in advance, as it is described in the C(sdkmanager) L(documentation,https://developer.android.com/tools/sdkmanager#accept-licenses),
for instance, using the M(ansible.builtin.command) module.
seealso:
- name: sdkmanager tool documentation
description: Detailed information of how to install and use sdkmanager command line tool.
link: https://developer.android.com/tools/sdkmanager
'''
"""
EXAMPLES = r'''
EXAMPLES = r"""
- name: Install build-tools;34.0.0
community.general.android_sdk:
name: build-tools;34.0.0
@ -122,21 +119,21 @@ EXAMPLES = r'''
accept_licenses: true
state: present
channel: canary
'''
"""
RETURN = r'''
RETURN = r"""
installed:
description: a list of packages that have been installed
returned: when packages have changed
type: list
sample: ['build-tools;34.0.0', 'platform-tools']
description: A list of packages that have been installed.
returned: when packages have changed
type: list
sample: ['build-tools;34.0.0', 'platform-tools']
removed:
description: a list of packages that have been removed
returned: when packages have changed
type: list
sample: ['build-tools;34.0.0', 'platform-tools']
'''
description: A list of packages that have been removed.
returned: when packages have changed
type: list
sample: ['build-tools;34.0.0', 'platform-tools']
"""
from ansible_collections.community.general.plugins.module_utils.mh.module_helper import StateModuleHelper
from ansible_collections.community.general.plugins.module_utils.android_sdkmanager import Package, AndroidSdkManager