0

My problem is similar to Installing package from PPA using Puppet but I don't know how to make it work.

I want Puphpet to apt to install Apache 2.4.23-5.0 this PPA instead of the normal deb repo. There is already a version of the same name in the deb repo so it's important that I get this custom version that contains a backport.

I'd like to use the solution offered by @msanford, but don't know where to start.

Can I just append this fragment:

apt::ppa { 'ppa:ondrej/apache2':}

package { 'apache2':
  ensure  => 'installed',
  require => Apt::Ppa['ppa:ondrej/apache2']

to the end of .../vm/profile/my-box/puphpet/puppet/modules/apt/manifests/init.pp ?

1

Don't add Package['apache2'] to your apt module, that doesn't make any sense. It should be in a apache2 module.

Regardless, the package needs to require Exec['apt_update'] to ensure that the apt-get update is completed before installing the package. You also should ensure the package uses the version you want.

apt::ppa { 'ppa:ondrej/apache2':}

package { 'apache2':
  ensure  => '2.4.23-5.0',
  require => [Exec['apt_update'], Apt::Ppa['ppa:ondrej/apache2']]
}

Here, I'm assuming that the version you listed is the same as the deb version. Sometimes the string is slightly different.

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.