[PR #9418/43599c68 backport][stable-10] c*.py: normalize docs (#9426)

c*.py: normalize docs (#9418)

* c*.py: normalize docs

* fix copy/paste mistake

* Apply suggestions from code review

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

---------

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

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

View file

@ -9,115 +9,113 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type
DOCUMENTATION = '''
---
DOCUMENTATION = r"""
module: composer
author:
- "Dimitrios Tydeas Mengidis (@dmtrs)"
- "René Moser (@resmo)"
- "Dimitrios Tydeas Mengidis (@dmtrs)"
- "René Moser (@resmo)"
short_description: Dependency Manager for PHP
description:
- >
Composer is a tool for dependency management in PHP. It allows you to
declare the dependent libraries your project needs and it will install
them in your project for you.
- Composer is a tool for dependency management in PHP. It allows you to declare the dependent libraries your project needs
and it will install them in your project for you.
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:
command:
type: str
description:
- Composer command like "install", "update" and so on.
default: install
arguments:
type: str
description:
- Composer arguments like required package, version and so on.
default: ''
executable:
type: path
description:
- Path to PHP Executable on the remote host, if PHP is not in PATH.
aliases: [ php_path ]
working_dir:
type: path
description:
- Directory of your project (see --working-dir). This is required when
the command is not run globally.
- Will be ignored if O(global_command=true).
global_command:
description:
- Runs the specified command globally.
type: bool
default: false
prefer_source:
description:
- Forces installation from package sources when possible (see --prefer-source).
default: false
type: bool
prefer_dist:
description:
- Forces installation from package dist even for dev versions (see --prefer-dist).
default: false
type: bool
no_dev:
description:
- Disables installation of require-dev packages (see --no-dev).
default: true
type: bool
no_scripts:
description:
- Skips the execution of all scripts defined in composer.json (see --no-scripts).
default: false
type: bool
no_plugins:
description:
- Disables all plugins (see --no-plugins).
default: false
type: bool
optimize_autoloader:
description:
- Optimize autoloader during autoloader dump (see --optimize-autoloader).
- Convert PSR-0/4 autoloading to classmap to get a faster autoloader.
- Recommended especially for production, but can take a bit of time to run.
default: true
type: bool
classmap_authoritative:
description:
- Autoload classes from classmap only.
- Implicitly enable optimize_autoloader.
- Recommended especially for production, but can take a bit of time to run.
default: false
type: bool
apcu_autoloader:
description:
- Uses APCu to cache found/not-found classes
default: false
type: bool
ignore_platform_reqs:
description:
- Ignore php, hhvm, lib-* and ext-* requirements and force the installation even if the local machine does not fulfill these.
default: false
type: bool
composer_executable:
type: path
description:
- Path to composer executable on the remote host, if composer is not in E(PATH) or a custom composer is needed.
version_added: 3.2.0
command:
type: str
description:
- Composer command like V(install), V(update) and so on.
default: install
arguments:
type: str
description:
- Composer arguments like required package, version and so on.
default: ''
executable:
type: path
description:
- Path to PHP executable on the remote host, if PHP is not in E(PATH).
aliases: [php_path]
working_dir:
type: path
description:
- Directory of your project (see C(--working-dir)). This is required when the command is not run globally.
- Will be ignored if O(global_command=true).
global_command:
description:
- Runs the specified command globally.
type: bool
default: false
prefer_source:
description:
- Forces installation from package sources when possible (see C(--prefer-source)).
default: false
type: bool
prefer_dist:
description:
- Forces installation from package dist even for dev versions (see C(--prefer-dist)).
default: false
type: bool
no_dev:
description:
- Disables installation of require-dev packages (see C(--no-dev)).
default: true
type: bool
no_scripts:
description:
- Skips the execution of all scripts defined in composer.json (see C(--no-scripts)).
default: false
type: bool
no_plugins:
description:
- Disables all plugins (see C(--no-plugins)).
default: false
type: bool
optimize_autoloader:
description:
- Optimize autoloader during autoloader dump (see C(--optimize-autoloader)).
- Convert PSR-0/4 autoloading to classmap to get a faster autoloader.
- Recommended especially for production, but can take a bit of time to run.
default: true
type: bool
classmap_authoritative:
description:
- Autoload classes from classmap only.
- Implicitly enable optimize_autoloader.
- Recommended especially for production, but can take a bit of time to run.
default: false
type: bool
apcu_autoloader:
description:
- Uses APCu to cache found/not-found classes.
default: false
type: bool
ignore_platform_reqs:
description:
- Ignore php, hhvm, lib-* and ext-* requirements and force the installation even if the local machine does not fulfill
these.
default: false
type: bool
composer_executable:
type: path
description:
- Path to composer executable on the remote host, if composer is not in E(PATH) or a custom composer is needed.
version_added: 3.2.0
requirements:
- php
- composer installed in bin path (recommended /usr/local/bin) or specified in O(composer_executable)
- php
- composer installed in bin path (recommended C(/usr/local/bin)) or specified in O(composer_executable)
notes:
- Default options that are always appended in each execution are --no-ansi, --no-interaction and --no-progress if available.
- We received reports about issues on macOS if composer was installed by Homebrew. Please use the official install method to avoid issues.
'''
- Default options that are always appended in each execution are C(--no-ansi), C(--no-interaction) and C(--no-progress) if available.
- We received reports about issues on macOS if composer was installed by Homebrew. Please use the official install method
to avoid issues.
"""
EXAMPLES = '''
EXAMPLES = r"""
- name: Download and installs all libs and dependencies outlined in the /path/to/project/composer.lock
community.general.composer:
command: install
@ -141,7 +139,7 @@ EXAMPLES = '''
command: require
global_command: true
arguments: my/package
'''
"""
import re
from ansible.module_utils.basic import AnsibleModule