I'm creating a manifest to install LAMP on a CentOS 6 machine. Everything works except for installing some pear modules. When issuing puppet /etc/puppet/modules/webserver/manifests/init.pp I get the following:

Invalid package provider 'pear' at /etc/puppet/modules/webserver/manifests/init.pp:111

Here are the relevant parts of the manifest, including the order of includes at the bottom:

class php {

  package {'php':
    ensure => present,  
    before => File['/etc/php.ini'],

  file {'/etc/php.ini':
    ensure => file,

  $packagelist = [

  package { $packagelist:
    ensure => installed,
    require => Package['php'],
    notify => Service['httpd'],

class pear {
  package {
        ensure => installed,
        provider => 'pear';
        ensure => installed,
        provider => 'pear';

include php
include pear

I can comment out the include pear line at the bottom, and the rest installs without a hitch. rpm -qa | grep php-pear shows that package php-pear was successfully installed. Issuing pear at a prompt returns the expected pear help menu.

If I return to the init.pp file, and uncomment include pear and re-run puppet /etc/puppet/modules/webserver/manifests/init.pp, the same error appears.

What gives?


Resolved by upgrading to Puppet 2.27, then using puppet-pear module.



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.