Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've just tried basic puppet manifest which actually takes around 23 seconds to apply.

root@ovh:/root # cat freebsd.pp
package { '*./editors/vim':
    ensure => installed,

after adding --debug switch, it clearly seen how puppet every time reinstalls vim package with pkg_add.

q1) how force puppet to use port collection maybe with some portmaster or any other port management utility?

q2) Is this package name would be also valid for linux distros? Or I should make two file entries with different provider?

share|improve this question
up vote 4 down vote accepted

Does dropping the wildcard and supplying a provider help speed things up?

package { 'editors/vim':
    ensure => 'installed',
    provider => 'ports',

to add support for multiple operating systems you can use:

case $operatingsystem {
    centos, redhat: { 
        $provider = "yum",
        $vim = "vim", 
    freebsd: { 
        $provider = "ports", 
        $vim = "editors/vim", 
    default: { fail("Unrecognized operating system") }


package { $vim:
    ensure => 'installed',
    provider => $provider,
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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