New in version 1.6.
parameter | required | default | choices | comments |
---|---|---|---|---|
arguments (added in 2.0)
| no | Composer arguments like required package, version and so on. | ||
command (added in 1.8)
| no | install | Composer command like "install", "update" and so on. | |
executable (added in 2.4)
| no | Path to PHP Executable on the remote host, if PHP is not in PATH aliases: php_path | ||
global_command (added in 2.4)
| no |
| Runs the specified command globally. aliases: global-command | |
ignore_platform_reqs (added in 2.0)
| no |
| Ignore php, hhvm, lib-* and ext-* requirements and force the installation even if the local machine does not fulfill these. aliases: ignore-platform-reqs | |
no_dev | no | True |
| Disables installation of require-dev packages (see --no-dev). aliases: no-dev |
no_plugins | no |
| Disables all plugins ( see --no-plugins ). aliases: no-plugins | |
no_scripts | no |
| Skips the execution of all scripts defined in composer.json (see --no-scripts). aliases: no-scripts | |
optimize_autoloader | no | True |
| 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. aliases: optimize-autoloader |
prefer_dist | no |
| Forces installation from package dist even for dev versions (see --prefer-dist). aliases: prefer-dist | |
prefer_source | no |
| Forces installation from package sources when possible (see --prefer-source). aliases: prefer-source | |
working_dir | no | Directory of your project (see --working-dir). This is required when the command is not run globally. Will be ignored if global_command=true .aliases: working-dir |
# 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
Note
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Testing Ansible and Developing Modules.
© 2012–2017 Michael DeHaan
© 2017 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/composer_module.html