Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
add comment

1 Answer 1

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
add comment

Your Answer

 
discard

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.