Reputation: 1593
I have a package statement in a puppet class that reads like this:
package { 'bc':
ensure => present,
}
But the class needs to go away now. I still need that module however.
In my puppet repository the next best logical place to put the requirement for this module is in a defined type. Is it legal/ok in puppet to include a package statement in there?
Upvotes: 0
Views: 51
Reputation: 2595
Generally using package
in defined
type is not a problem if you use it properly. The main problem you might have, is how to avoid "already defined" conflicts.
Please check my answer about avoiding code duplication and handling packages in puppet. Also consider using ensure_packages
from puppet stdlib.
Upvotes: 1