=============
This module installs the Perl programming language package, and provides a definition for loading and excluding Perl modules available on CPAN.
Note: Perl modules are hightly variable in their implementation, because "there's more than one way to do it", so some modules will have to be installed some other way. Though this module should give some idea on suitable code patterns that could get it done.
Clone into your puppet configuration in your puppet/modules
directory:
git clone git://github.com/nesi/puppet-perl.git perl
Or if you're managing your Puppet configuration with git, in your puppet
directory:
git submodule add git://github.com/nesi/puppet-perl.git modules/perl --init --recursive
cd modules/perl
git checkout master
git pull
cd ../..
git commit -m "added perl submodule from https://github.com/nesi/puppet-perl"
It might seem bit excessive, but it will make sure the submodule isn't headless...
Only tested on Ubuntu 12.04 LTS, should work for other Debian distributions. Should not require any other packages installed.
========================
The perl
class ensures that the Perl language is installed with some minimal tools required to manage Perl and CPAN modules.
This should install the perl
, pm-tools
and the Apps::pmuninstall
module with the default settings.
include perl
I reccomend you at least specify a CPAN mirror.
class{'perl':
version => '5.8.6',
ensure => installed,
cpan_mirror => 'ftp://some.mirror.cpan.org/pub/perl/CPAN/',
}
- version: Specifies the Perl version to install, defaults to the default installed on your Linux distribution.
- ensure: Passed to the packages installed, 'installed' is default.
- cpan_mirror: Select your CPAN mirrod, ftp://ftp.auckland.ac.nz/pub/perl/CPAN/ is the default. Change this if you're not in New Zealand.
- package: Specifies the Package to be installed, the defaultis 'perl'
- pmtools_package: Specifies the Perl management tools package to be installed, defaults to 'pmtools'.
============================================
Install a Perl module from CPAN:
perl::cpan{'module::name': ensure => installed}
Ensure that a Perl module is not installed:
perl::cpan{'module::name': ensure => absent}
- ensure: Ensure that the module is 'installed' or 'absent', defaults to installed.
- timeout: Changes the timeout in seconds for installing the Perl module, some modules can take a quite some time to compile. By default it is set to 120 seconds.
==========
- Change the CPAN definition to a case format for handling exceptional packages, broken package, and obsolete packages.
- Create some facter scripts for Perl, such as getting version and reporting CPAN mirror
=========
Written by Aaron Hicks ([email protected]) for the New Zealand eScience Infrastructure.
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License