mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 05:10:22 -07:00
adds DOCUMENTATION section and license headers
This commit is contained in:
parent
e499391688
commit
7e5382762a
2 changed files with 81 additions and 7 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
#!/usr/bin/python
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
# Copyright (c) 2024, Stanislav Shamilov <shamilovstas@protonmail.com>
|
||||||
|
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt 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
|
from __future__ import absolute_import, division, print_function
|
||||||
|
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
|
@ -1,8 +1,75 @@
|
||||||
|
#!/usr/bin/python
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
# Copyright (c) 2024, Stanislav Shamilov <shamilovstas@protonmail.com>
|
||||||
|
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt 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
|
from __future__ import absolute_import, division, print_function
|
||||||
|
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
|
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.
|
||||||
|
author: Stanislav Shamilov (@shamilovstas)
|
||||||
|
extends_documentation_fragment:
|
||||||
|
- community.general.attributes
|
||||||
|
attributes:
|
||||||
|
check_mode:
|
||||||
|
support: full
|
||||||
|
diff_mode:
|
||||||
|
support: none
|
||||||
|
options:
|
||||||
|
name:
|
||||||
|
description:
|
||||||
|
- A name of an Android SDK package (for instance, V(build-tools;34.0.0)).
|
||||||
|
aliases: ['package', 'pkg']
|
||||||
|
type: list
|
||||||
|
elements: str
|
||||||
|
state:
|
||||||
|
description:
|
||||||
|
- Indicates the desired package(s) state.
|
||||||
|
- V(present) ensures that package(s) is/are present.
|
||||||
|
- V(absent) ensures that package(s) is/are absent.
|
||||||
|
- V(latest) ensures that package(s) is/are installed and updated to the latest version(s).
|
||||||
|
choices: ['present', 'absent', 'latest']
|
||||||
|
default: present
|
||||||
|
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.
|
||||||
|
type: path
|
||||||
|
channel:
|
||||||
|
description:
|
||||||
|
- Indicates what channel must C(sdkmanager) use for installation of packages.
|
||||||
|
choices: ['stable', 'beta', 'dev', 'canary']
|
||||||
|
default: stable
|
||||||
|
type: str
|
||||||
|
requirements:
|
||||||
|
- C(java) >= 17
|
||||||
|
- C(sdkmanager) Command line tool for installing Android SDK packages.
|
||||||
|
notes:
|
||||||
|
- It is assumed that all necessary licenses for the packages that are to be installed are accepted before using
|
||||||
|
this module. If there are any unaccepted licenses, the module will fail. In order to accept all licenses that
|
||||||
|
have not been already accepted, one may use the C(sdkmanager --licenses) command
|
||||||
|
(see U(https://developer.android.com/tools/sdkmanager#accept-licenses)).
|
||||||
|
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: Before installing Android SDK packages, all licenses must be accepted
|
||||||
|
shell: "yes | sdkmanager --licenses"
|
||||||
|
|
||||||
- name: Install build-tools;34.0.0
|
- name: Install build-tools;34.0.0
|
||||||
community.general.android_sdk:
|
community.general.android_sdk:
|
||||||
name: build-tools;34.0.0
|
name: build-tools;34.0.0
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue