Note
This plugin is part of the community.general collection.
To install it use: ansible-galaxy collection install community.general
.
To use it in a playbook, specify: community.general.cpanm
.
Parameter | Choices/Defaults | Comments |
---|---|---|
executable path | Override the path to the cpanm executable | |
from_path string | The local directory from where to install | |
installdeps boolean |
| Only install dependencies |
locallib path | Specify the install base to install modules | |
mirror string | Specifies the base URL for the CPAN mirror to use | |
mirror_only boolean |
| Use the mirror's index file instead of the CPAN Meta DB |
name string | The name of the Perl library to install. You may use the "full distribution path", e.g. MIYAGAWA/Plack-0.99_05.tar.gz aliases: pkg | |
notest boolean |
| Do not run unit tests |
system_lib boolean |
| Use this if you want to install modules to the system perl include path. You must be root or have "passwordless" sudo for this to work. This uses the cpanm commandline option '--sudo', which has nothing to do with ansible privilege escalation. aliases: use_sudo |
version string | minimum version of perl module to consider acceptable |
Note
- name: Install Dancer perl package community.general.cpanm: name: Dancer - name: Install version 0.99_05 of the Plack perl package community.general.cpanm: name: MIYAGAWA/Plack-0.99_05.tar.gz - name: Install Dancer into the specified locallib community.general.cpanm: name: Dancer locallib: /srv/webapps/my_app/extlib - name: Install perl dependencies from local directory community.general.cpanm: from_path: /srv/webapps/my_app/src/ - name: Install Dancer perl package without running the unit tests in indicated locallib community.general.cpanm: name: Dancer notest: True locallib: /srv/webapps/my_app/extlib - name: Install Dancer perl package from a specific mirror community.general.cpanm: name: Dancer mirror: 'http://cpan.cpantesters.org/' - name: Install Dancer perl package into the system root path community.general.cpanm: name: Dancer system_lib: yes - name: Install Dancer if it is not already installed OR the installed version is older than version 1.0 community.general.cpanm: name: Dancer version: '1.0'
© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.10/collections/community/general/cpanm_module.html