mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-22 18:31:25 -07:00
[PR #9372/bef82e28 backport][stable-9] p[a-e]*: normalize docs (#9396)
p[a-e]*: normalize docs (#9372)
* p[a-e]*: normalize docs
* Update plugins/modules/packet_volume.py
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit bef82e28a2
)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
parent
b8968c5c1c
commit
c64705474d
17 changed files with 867 additions and 945 deletions
|
@ -12,54 +12,53 @@ from __future__ import absolute_import, division, print_function
|
|||
__metaclass__ = type
|
||||
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
DOCUMENTATION = r"""
|
||||
module: pear
|
||||
short_description: Manage pear/pecl packages
|
||||
description:
|
||||
- Manage PHP packages with the pear package manager.
|
||||
- Manage PHP packages with the pear package manager.
|
||||
author:
|
||||
- Jonathan Lestrelin (@jle64) <jonathan.lestrelin@gmail.com>
|
||||
- Jonathan Lestrelin (@jle64) <jonathan.lestrelin@gmail.com>
|
||||
extends_documentation_fragment:
|
||||
- community.general.attributes
|
||||
- community.general.attributes
|
||||
attributes:
|
||||
check_mode:
|
||||
support: full
|
||||
diff_mode:
|
||||
support: none
|
||||
check_mode:
|
||||
support: full
|
||||
diff_mode:
|
||||
support: none
|
||||
options:
|
||||
name:
|
||||
type: str
|
||||
description:
|
||||
- Name of the package to install, upgrade, or remove.
|
||||
required: true
|
||||
aliases: [pkg]
|
||||
state:
|
||||
type: str
|
||||
description:
|
||||
- Desired state of the package.
|
||||
default: "present"
|
||||
choices: ["present", "installed", "latest", "absent", "removed"]
|
||||
executable:
|
||||
type: path
|
||||
description:
|
||||
- Path to the pear executable.
|
||||
prompts:
|
||||
description:
|
||||
- List of regular expressions that can be used to detect prompts during pear package installation to answer the expected question.
|
||||
- Prompts will be processed in the same order as the packages list.
|
||||
- You can optionally specify an answer to any question in the list.
|
||||
- If no answer is provided, the list item will only contain the regular expression.
|
||||
- "To specify an answer, the item will be a dict with the regular expression as key and the answer as value C(my_regular_expression: 'an_answer')."
|
||||
- You can provide a list containing items with or without answer.
|
||||
- A prompt list can be shorter or longer than the packages list but will issue a warning.
|
||||
- If you want to specify that a package will not need prompts in the middle of a list, V(null).
|
||||
type: list
|
||||
elements: raw
|
||||
version_added: 0.2.0
|
||||
'''
|
||||
name:
|
||||
type: str
|
||||
description:
|
||||
- Name of the package to install, upgrade, or remove.
|
||||
required: true
|
||||
aliases: [pkg]
|
||||
state:
|
||||
type: str
|
||||
description:
|
||||
- Desired state of the package.
|
||||
default: "present"
|
||||
choices: ["present", "installed", "latest", "absent", "removed"]
|
||||
executable:
|
||||
type: path
|
||||
description:
|
||||
- Path to the pear executable.
|
||||
prompts:
|
||||
description:
|
||||
- List of regular expressions that can be used to detect prompts during pear package installation to answer the expected question.
|
||||
- Prompts will be processed in the same order as the packages list.
|
||||
- You can optionally specify an answer to any question in the list.
|
||||
- If no answer is provided, the list item will only contain the regular expression.
|
||||
- "To specify an answer, the item will be a dict with the regular expression as key and the answer as value C(my_regular_expression: 'an_answer')."
|
||||
- You can provide a list containing items with or without answer.
|
||||
- A prompt list can be shorter or longer than the packages list but will issue a warning.
|
||||
- If you want to specify that a package will not need prompts in the middle of a list, V(null).
|
||||
type: list
|
||||
elements: raw
|
||||
version_added: 0.2.0
|
||||
"""
|
||||
|
||||
EXAMPLES = r'''
|
||||
EXAMPLES = r"""
|
||||
- name: Install pear package
|
||||
community.general.pear:
|
||||
name: Net_URL2
|
||||
|
@ -75,19 +74,18 @@ EXAMPLES = r'''
|
|||
name: pecl/apcu
|
||||
state: present
|
||||
prompts:
|
||||
- (.*)Enable internal debugging in APCu \[no\]
|
||||
- (.*)Enable internal debugging in APCu \[no\]
|
||||
|
||||
- name: Install pecl package with expected prompt and an answer
|
||||
community.general.pear:
|
||||
name: pecl/apcu
|
||||
state: present
|
||||
prompts:
|
||||
- (.*)Enable internal debugging in APCu \[no\]: "yes"
|
||||
- (.*)Enable internal debugging in APCu \[no\]: "yes"
|
||||
|
||||
- name: Install multiple pear/pecl packages at once with prompts.
|
||||
Prompts will be processed on the same order as the packages order.
|
||||
If there is more prompts than packages, packages without prompts will be installed without any prompt expected.
|
||||
If there is more packages than prompts, additional prompts will be ignored.
|
||||
- name: Install multiple pear/pecl packages at once with prompts. Prompts will be processed on the same order as the packages order. If there
|
||||
is more prompts than packages, packages without prompts will be installed without any prompt expected. If there is more packages than prompts,
|
||||
additional prompts will be ignored.
|
||||
community.general.pear:
|
||||
name: pecl/gnupg, pecl/apcu
|
||||
state: present
|
||||
|
@ -95,10 +93,9 @@ EXAMPLES = r'''
|
|||
- I am a test prompt because gnupg doesnt asks anything
|
||||
- (.*)Enable internal debugging in APCu \[no\]: "yes"
|
||||
|
||||
- name: Install multiple pear/pecl packages at once skipping the first prompt.
|
||||
Prompts will be processed on the same order as the packages order.
|
||||
If there is more prompts than packages, packages without prompts will be installed without any prompt expected.
|
||||
If there is more packages than prompts, additional prompts will be ignored.
|
||||
- name: Install multiple pear/pecl packages at once skipping the first prompt. Prompts will be processed on the same order as the packages order.
|
||||
If there is more prompts than packages, packages without prompts will be installed without any prompt expected. If there is more packages
|
||||
than prompts, additional prompts will be ignored.
|
||||
community.general.pear:
|
||||
name: pecl/gnupg, pecl/apcu
|
||||
state: present
|
||||
|
@ -115,7 +112,7 @@ EXAMPLES = r'''
|
|||
community.general.pear:
|
||||
name: Net_URL2,pecl/json_post
|
||||
state: absent
|
||||
'''
|
||||
"""
|
||||
|
||||
import os
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue