salt.states.cpan

Installation of Perl Modules Using cpan

These states manage system installed perl modules. Note that perl must be installed for these states to be available, so cpan states should include a requisite to a pkg.installed state for the package which provides perl. Example:

perl:
  pkg.installed
salt.states.cpan.installed(name, modules=None, bin_env=None, force=None, mirror=None, notest=None, **kwargs)

Make sure the package is installed

bin_env :

Absolute path to a virtual environment directory or absolute path to a cpan executable.

name

The name of the perl module to install.

modules

Install the specified modules.

force

Force the specified action, when it normally would have failed. Use this to install a module even if its tests fail.

mirror

A list of mirrors to use for just this run.

cpanm:
  cpan.installed:
    - name: App::cpanminus
    - mirror:
      - http://cpan.metacpan.org/
      - ftp://mirror.xmission.com/CPAN/
notest

Do not test modules. Simply install them.

Example:

cpanm:
  cpan.installed:
    - modules:
      - App::cpanminus
      - CPAN
    - mirror:
      - http://cpan.metacpan.org/
      - ftp://mirror.xmission.com/CPAN/
    - require:
      - pkg: perl
salt.states.cpan.removed(module, details=None, bin_env=None)
salt.states.cpan.uptodate(name, modules=None, bin_env=None, force=None, mirror=None, notest=None, **kwargs)

Verify that the given packages are completely up to date

bin_env :

Absolute path to a virtual environment directory or absolute path to a cpan executable.

name

The name of the perl module to install.

modules

Install the specified modules.

force

Force the specified action, when it normally would have failed. Use this to install a module even if its tests fail.

mirror

A comma-separated list of mirrors to use for just this run.

cpanm:
  cpan.uptodate:
    - name: App::cpanminus
    - mirror:
      - http://cpan.metacpan.org/
      - ftp://mirror.xmission.com/CPAN/
    - require:
      - pkg: perl
notest

Do not test modules. Simply install them.

Example:

cpanm:
  cpan.uptodate:
    - modules:
      - App::cpanminus
      - CPAN
    - require:
      - pkg: perl