On May 14, 2:31 pm, Markus Falb <markus.f...@fasel.at> wrote: > On 14.5.2012 19:48, jcbollinger wrote: > > > > > On May 14, 12:07 pm, Markus Falb <markus.f...@fasel.at> wrote: > > >> and now > >> I am thinking about setting a default > > >> Service { > >> hasstatus => true > > >> } > > >> so I do not have to specify it for every service. > > > That's entirely reasonable if your initscripts support it. > > Understood! But, Hmm. What if I want to make my module public? I can not > know if another ones initscripts supports hasstatus and I cannot guess > another ones puppet version. > > How would you deal with this issue in modules made public?
First, I would avoid putting top-level resource default declarations into a module intended to be shared, as their scope would extend beyond the module. If you want module-wide resource defaults, however, then create a master class for your module, put the defaults inside it, and make it (afterward) include any other needed classes. As far as choosing the correct OS(version)-specific default values within your module, I would define such values in a class or in a hiera data store, keyed one way or another to the OS (and maybe OS version). If you want to re-use the OS-specific data across multiple modules then you could split it out into its own module. John -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.