ansible / ansible.builtin / v2.9.27 / module / composer Dependency Manager for PHP | "added in version" 1.6 of ansible.builtin" Authors: Dimitrios Tydeas Mengidis (@dmtrs), René Moser (@resmo) preview | supported by communityansible.builtin.composer (v2.9.27) — module
pip
Install with pip install ansible==2.9.27
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.
# Downloads and installs all the libs and dependencies outlined in the /path/to/project/composer.lock - composer: command: install working_dir: /path/to/project
- composer: command: require arguments: my/package working_dir: /path/to/project
# Clone project and install with all dependencies - composer: command: create-project arguments: package/package /path/to/project ~1.0 working_dir: /path/to/project prefer_dist: yes
# Installs package globally - composer: command: require global_command: yes arguments: my/package
no_dev: aliases: - no-dev default: true description: - Disables installation of require-dev packages (see --no-dev). type: bool command: default: install description: - Composer command like "install", "update" and so on. version_added: '1.8' version_added_collection: ansible.builtin arguments: description: - Composer arguments like required package, version and so on. version_added: '2.0' version_added_collection: ansible.builtin executable: aliases: - php_path description: - Path to PHP Executable on the remote host, if PHP is not in PATH. version_added: '2.4' version_added_collection: ansible.builtin no_plugins: aliases: - no-plugins default: false description: - Disables all plugins ( see --no-plugins ). type: bool no_scripts: aliases: - no-scripts default: false description: - Skips the execution of all scripts defined in composer.json (see --no-scripts). type: bool prefer_dist: aliases: - prefer-dist default: false description: - Forces installation from package dist even for dev versions (see --prefer-dist). type: bool working_dir: aliases: - working-dir description: - Directory of your project (see --working-dir). This is required when the command is not run globally. - Will be ignored if C(global_command=true). prefer_source: aliases: - prefer-source default: false description: - Forces installation from package sources when possible (see --prefer-source). type: bool global_command: aliases: - global-command default: false description: - Runs the specified command globally. type: bool version_added: '2.4' version_added_collection: ansible.builtin apcu_autoloader: aliases: - apcu-autoloader default: false description: - Uses APCu to cache found/not-found classes type: bool version_added: '2.7' version_added_collection: ansible.builtin optimize_autoloader: aliases: - optimize-autoloader default: true 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. type: bool ignore_platform_reqs: aliases: - ignore-platform-reqs default: false description: - Ignore php, hhvm, lib-* and ext-* requirements and force the installation even if the local machine does not fulfill these. type: bool version_added: '2.0' version_added_collection: ansible.builtin classmap_authoritative: aliases: - classmap-authoritative default: false description: - Autoload classes from classmap only. - Implicitely enable optimize_autoloader. - Recommended especially for production, but can take a bit of time to run. type: bool version_added: '2.7' version_added_collection: ansible.builtin