1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Move examples to EXAMPLES variable

Partially fix #507
This commit is contained in:
Michael Scherer 2015-07-25 13:58:45 +02:00 committed by Matt Clay
parent 2ff3438435
commit d031cd2998

View file

@ -58,24 +58,31 @@ options:
- Use the mirror's index file instead of the CPAN Meta DB - Use the mirror's index file instead of the CPAN Meta DB
required: false required: false
default: false default: false
examples:
- code: "cpanm: name=Dancer"
description: Install I(Dancer) perl package.
- code: "cpanm: name=MIYAGAWA/Plack-0.99_05.tar.gz"
description: Install version 0.99_05 of the I(Plack) perl package.
- code: "cpanm: name=Dancer locallib=/srv/webapps/my_app/extlib"
description: "Install I(Dancer) (U(http://perldancer.org/)) into the specified I(locallib)"
- code: "cpanm: from_path=/srv/webapps/my_app/src/"
description: Install perl dependencies from local directory.
- code: "cpanm: name=Dancer notest=True locallib=/srv/webapps/my_app/extlib"
description: Install I(Dancer) perl package without running the unit tests in indicated I(locallib).
- code: "cpanm: name=Dancer mirror=http://cpan.cpantesters.org/"
description: Install I(Dancer) perl package from a specific mirror
notes: notes:
- Please note that U(http://search.cpan.org/dist/App-cpanminus/bin/cpanm, cpanm) must be installed on the remote host. - Please note that U(http://search.cpan.org/dist/App-cpanminus/bin/cpanm, cpanm) must be installed on the remote host.
author: "Franck Cuny (@franckcuny)" author: "Franck Cuny (@franckcuny)"
''' '''
EXAMPLES = '''
# install Dancer perl package
- cpanm: name=Dancer
# install version 0.99_05 of the Plack perl package
- cpanm: name=MIYAGAWA/Plack-0.99_05.tar.gz
# install Dancer into the specified locallib
- cpanm: name=Dancer locallib=/srv/webapps/my_app/extlib
# install perl dependencies from local directory
- cpanm: from_path=/srv/webapps/my_app/src/
# install Dancer perl package without running the unit tests in indicated locallib
- cpanm: name=Dancer notest=True locallib=/srv/webapps/my_app/extlib
# install Dancer perl package from a specific mirror
- cpanm: name=Dancer mirror=http://cpan.cpantesters.org/
'''
def _is_package_installed(module, name, locallib, cpanm): def _is_package_installed(module, name, locallib, cpanm):
cmd = "" cmd = ""
if locallib: if locallib: