Forge Home

pear

Puppet module to manage PHP PEAR Packages

133,613 downloads

131,183 latest version

2.4 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Support the Puppet Community by contributing to this module

You are welcome to contribute to this module by suggesting new features, currency updates, or fixes. Every contribution is valuable to help ensure that the module remains compatible with the latest Puppet versions and continues to meet community needs. Complete the following steps:

  1. Review the module’s contribution guidelines and any licenses. Ensure that your planned contribution aligns with the author’s standards and any legal requirements.
  2. Fork the repository on GitHub, make changes on a branch of your fork, and submit a pull request. The pull request must clearly document your proposed change.

For questions about updating the module, contact the module’s author.

Version information

  • 1.0.3 (latest)
  • 1.0.2
  • 1.0.1
  • 1.0.0
released Aug 11th 2013

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'rafaelfc-pear', '1.0.3'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add rafaelfc-pear
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install rafaelfc-pear --version 1.0.3

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download
Tags: php, pear

Documentation

rafaelfc/pear — version 1.0.3 Aug 11th 2013

Introduction

This module installs PEAR from a package manager and aids you in installing the latest versions (or specified versions) of PEAR packages.

Credit

This code is taken from https://gist.github.com/305778, which is itself based on http://www.mit.edu/~marthag/puppet/pear.rb.

You can see all the changes that have been made since the initial commit at the following URL:

https://github.com/smerrill/puppet-pear/commits/master/lib/puppet/provider/package/pear.rb

Example usage

This module will try to install PEAR via the package name php-pear (this is also configurable) and will then allow the installation of PEAR packages through the pear::package function.

Here is an example of installing the default php-pear package and upgrading PEAR, then installing Console_Table and finally installing drush 4.5.0 from a third-party PEAR repository, pear.drush.org.

include pear

# If no version number is supplied, the latest stable release will be
# installed. In this case, upgrade PEAR to 1.9.2+ so it can use
# pear.drush.org without complaint.
pear::package { "PEAR": }
pear::package { "Console_Table": }

# Version numbers are supported.
pear::package { "drush":
  version => "4.5.0",
  repository => "pear.drush.org",
}

Alternately, to specify a different package for PEAR (if you are using IUS on CentOS, for example) you can invoke the class using the parameterized class syntax instead of an include.

class { "pear":
  package => "php52-pear",
  require => Package["php52-cli"],
}

# If no version number is supplied, the latest stable release will be
# installed. In this case, upgrade PEAR to 1.9.2+ so it can use
# pear.drush.org without complaint.
pear::package { "PEAR": }
pear::package { "Console_Table": }

# Version numbers are supported.
# Also, make sure PEAR is upgraded before trying to install drush.
pear::package { "drush":
  version => "4.5.0",
  repository => "pear.drush.org",
  require => Pear::Package["PEAR"],
}

License

Puppet-pear module is released under the {MIT License}[http://www.opensource.org/licenses/MIT].