For this kind of stuff i created a package module that only ships packages
potentially shared (python lib, curl, etc...).
I  virtually déclare un thé module ans realie un the main modules
Le 27 mars 2014 15:03, "och ach" <och...@gmail.com> a écrit :

> 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 <s.ship...@auckland.ac.nz> 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
>> > s.ship...@auckland.ac.nz
>> > 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 puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/df5d4469-4bd5-4f48-b7d4-a221aadc0edd%40googlegroups.com<https://groups.google.com/d/msgid/puppet-users/df5d4469-4bd5-4f48-b7d4-a221aadc0edd%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAJgpziV%2BNwR2Jht%2BtkY8zibsctombqQ7HVqhv13-K9QudK822g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to