user393219
user393219

Reputation:

Install Specific PHP Version with Puppet & Vagrant

First time puppet user, and I'm having trouble getting an install of a specified version of PHP using Vagrant. I'm using the example42/php module, and I keep running into ensure problems.

Error: Could not update: Execution of '/usr/bin/yum -d 0 -e 0 -y install php-5.5.12' returned 1: Error: Nothing to do
Error: /Stage[main]/Php/Package[php]/ensure: change from absent to 5.5.12 failed: Could not update: Execution of '/usr/bin/yum -d 0 -e 0 -y install php-5.5.12' returned 1: Error: Nothing to do
Warning: /Stage[main]/Php/File[php.conf]: Skipping because of failed dependencies

spits out of my console, followed by another attempt that's identical.

My .pp file I'm provisioning with:

class lamp {
    # package {'php':
    #   ensure => present,
    # }
}
node 'node1' {  
    include lamp
    file { '/php':
        ensure => directory,
        # I read that I may need to have a directory in order for the install to work...
    }
    class { 'php':
        version => '5.5.12',
    }
}

As far as I can tell, I'm referencing correctly to the modules, which I store inside /puppet/modules/ and it's finding them, but I'm having a hard time getting a specific version of PHP to install. I could use a very simple "getting started LAMP" for Puppet but that only install 5.3.3 even if I ensure => latest,

Upvotes: 1

Views: 2585

Answers (1)

ek9
ek9

Reputation: 3442

The puppet module only uses your system's package manager (yum) to download specific php packages. If it cannot find the required packages, it will not work. 5.3.3 is latest version in your repository, so it install that. I wouldn't be surprised if this is the only version of php available in your repositories.

You need to configure yum with some repositories which have the required PHP packages and then try the puppet module with that.

Upvotes: 0

Related Questions