Issue #2692 has been reported by Jordan Sissel.
----------------------------------------
Feature #2692: Allow duplicate resource names for a resource with different
providers.
http://projects.reductivelabs.com/issues/2692
Author: Jordan Sissel
Status: Unreviewed
Priority: Normal
Assigned to:
Category:
Target version:
Affected version: 0.25.0
Keywords: puppetcamp
Branch:
This was brought up today at puppetcamp during the "packaging sucks"
discussion. The specific request below is mainly for supporting multiple
package providers providing packages with the same name. It can perhaps be tied
to other resource types, but I don't have use cases in mind for those at this
time.
An example problem to be solved follows:
Both 'yum' and 'gem' providers can install 'mysql' as a package. Yum generally
gets you the standard mysql client tools, while gem gets you the ruby mysql
module.
You cannot currently do this:
class foo {
package {
"mysql": ensure => present, provider => yum;
"mysql": ensure => present, provider => gem;
}
}
You will get a duplicate resource name complaint. Solving this is probably not
totally trivial given the above syntax, if permitted, makes unclear what
Package["mysql"] should reference; more on this later.
Solving this with namespacing may be of value: <resource>::<provider>. For
example, we could:
file {
"bar": require => Package::Gem["mysql"];
}
There would be an implied relationship that Package::Gem refers to 'package'
resources with provider 'gem'. Backwards compatibility to today's behavior can
be achieved by still allowing Package["foo"], but throwing an error when
Package["foo"] comes under multiple names.
One way to work around this today is to alias one of these packages to another
name, but is not an ideal workaround. Aliasing the gem package as 'gem-mysql'
and then referring to Package["gem-mysql"] - doesn't make me feel warm and
fuzzy.
Another option is to only use one package provider; instead of aliasing,
convert all your gems to rpms, for example, and only use yum. This practice
seems pretty common, and only seems to serve to move the 'alias' action from
the puppet manifest to the package name (name your rpm package 'gem-mysql', for
example).
--
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://reductivelabs.com/redmine/my/account
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Puppet Bugs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/puppet-bugs?hl=en
-~----------~----~----~----~------~----~------~--~---