Issue #18490 has been updated by Adam Cohen.
Eugene Vilensky wrote: > this RVM [module](https://github.com/blt04/puppet-rvm) introduced me to the > following convention: > > if ! defined(Package['httpd']) { package { 'httpd': ensure => > installed } } > if ! defined(Package['httpd-devel']) { package { 'httpd-devel': ensure => > installed } } > if ! defined(Package['mod_ssl']) { package { 'mod_ssl': ensure => > installed } } > > It seems to work and I occasionally patch my use of puppetlabs-apache module > likewise. Is there value in standardizing this approach (especially when > focusing on packages provided by stable distros)? I'm actually struggling with this right now since the puppetlabs-apache module uses mod_ssl as well, but doesn't check to see if it's defined before using it. This causes an error if the puppetlabs-apache module is included after the rvm module, which, as others mentioned, introduces an order dependency. So using defined is an all-or-nothing solution: every module must use defined, otherwise it's useless. ---------------------------------------- Feature #18490: Duplicate resources can make re-usable Forge modules difficult https://projects.puppetlabs.com/issues/18490#change-95150 * Author: Ryan Coleman * Status: Investigating * Priority: Normal * Assignee: Ryan Coleman * Category: modules * Target version: 3.x * Affected Puppet version: * Keywords: * Branch: ---------------------------------------- [EDIT] Re-working this description based on feedback in comment #7. User installs module A to provide a web application. User installs module B to provide a database server. Both module A and module B declare a package resource for foo. User declares classes from both module A and B on the same node. User receives duplicate resource declaration error, Puppet run fails. I wish to prevent customers of Forge and Puppet from experiencing this frustration, when both classes really do need that package for their functionality but cannot be used together as-is. I'd love direct questions if you need to understand this better from my perspective. -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/groups/opt_out.
