+1 vote
1 view
in Devops and Agile by (22.3k points)

Apparently, this is not possible, but I can't believe that I'm the only one who needs it.

I want to specify the version of php to install because I'm working on an old project requiring php 5.2.

Actually, my VM is based on Oneiric with php 5.3

Do you have any solution to do this?

1 Answer

0 votes
by (38.3k points)

You can specify a version:

package { 'php' :

  ensure => '5.2' ,

}

However, if that version of PHP RPM/Deb/package isn't available in your upstream repo, then you'll want to either:

Find an alternate repo that has that package, and add it to your repo list

Set up your own repo with the package

Install from your filesystem, by providing a path to the package:

package { 'php' :

  ensure => '5.2' ,

  source => '/some/path/to/php-5.2.rpm' ,

}

...