RE: [Puppet Users] How to handle multiple modules requiring the same packages

2012-01-17 Thread Steve Shipway
You can make the package resource definition conditional. class foo { if ! defined( Package[gcc] ) { package { gcc: ensure=>installed; } } } class bar { if ! defined( Package[gcc] ) { package { gcc: ensure=>installed; } } } Or, define a new class for the package(s) and include that clas

Re: [Puppet Users] How to handle multiple modules requiring the same packages

2012-01-13 Thread Luke Bigum
It sounds like you've got this written down twice: package { "gcc": ensure => installed } Causing a duplicate resource definition. To get around this, move the gcc package install into a module of it's own, called say "gcc", then in your database and application modules simply "include gcc" to

Re: [Puppet Users] How to handle multiple modules requiring the same packages

2012-01-13 Thread Nigel Kersten
On Fri, Jan 13, 2012 at 9:02 AM, bel wrote: > We have a database module and an application module that both require > gcc. When I include both modules in a node, I get errors about the > package being already defined. > > How would I address this? > > Move the gcc package definition to a third mo

[Puppet Users] How to handle multiple modules requiring the same packages

2012-01-13 Thread bel
We have a database module and an application module that both require gcc. When I include both modules in a node, I get errors about the package being already defined. How would I address this? -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To