same problem here. just find that razor module has static def of package curl. what is the best practice?
for now i have deleted the definition from module and included my virtual packages definitions but would love to solve it not dirty fix it On Saturday, 21 January 2012 15:02:27 UTC+1, bel wrote: > > I find it confusing that Puppet defines modules as reusable code yet, > when it comes to packages, you have to have prior knowledge of what > other package resources are defined. > > Thank you for all the proposed solutions but does anyone know if > Puppet has a best practice they recommend in this case? Otherwise, I'm > going with defining new classes for the packages. > > On Jan 17, 4:11 am, Steve Shipway <[email protected]> wrote: > > 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 > > > > class pkg::gcc { > > package { gcc: ensure=>installed; }} > > > > class foo { > > include pkg::gcc} > > > > class bar { > > include pkg::gcc > > > > } > > > > Second method is more elegant IMHO; but if its a one-off then first > might be simpler. > > > > Steve > > > > Steve Shipway > > University of Auckland ITS > > UNIX Systems Design Lead > > [email protected] > > Ph: +64 9 373 7599 ext 86487 -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/df5d4469-4bd5-4f48-b7d4-a221aadc0edd%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
