Apparently this is not possible, but I can't believe that I'm the only one who need 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 ?
Using either a caret ( ^ ) or a tilde ( ~ ) we can specify the latest minor or patch version, respectively. This way you can specify a compatible package version, but still get the latest.
adminfile. A file containing package defaults for installing packages. This attribute is only used on Solaris. Its value should be a path to a local file stored on the target system.
One of the many providers for the package resource type is Oracle Solaris pkg. Note that the sun provider for the package resource type is only for Oracle Solaris 10 packages and earlier. One of the many providers for the service resource type is Oracle Solaris smf.
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:
Install from your filesystem, by providing a path to the package:
package { 'php' : ensure => '5.2' , source => '/some/path/to/php-5.2.rpm' , }
This is pretty close to how I use custom apt repositories in puppet with their gpg keys
# put downloaded pgp keys into modulename/files/pgp/ # this will copy them all into /tmp file { '/tmp/pgp-keys': ensure => directory, recurse => true, source => 'puppet:///modules/modulename/pgp', } # add any keys that you need exec { 'apt-key add': command => '/usr/bin/apt-key add /tmp/pgp-keys/number1.gpg.key &&/ /usr/bin/apt-key add /tmp/pgp-keys/number2.gpg.key', subscribe => File['/tmp/pgp-keys'], refreshonly => true, } # make sure you add your custom apt repository file { 'cassandra.sources.list': ensure => 'present', path => '/etc/apt/sources.list.d/cassandra.sources.list', source => 'puppet:///modules/modulename/cassandra.sources.list', require => Exec['apt-key add'], } # update your package list exec { 'apt-get update': command => '/usr/bin/apt-get update', require => File['cassandra.sources.list'], } # Install your specific package - I haven't actually used this yet, # based on answer by opsmason package { 'cassandra': ensure => '1.2.0', require => Exec['apt-get update'], }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With