(Felix - my apologies, i'm just going to start a new thread :)
As requested, a new thread to discuss the possibility of having a module
masquerading feature.
Have a look at PUP-2811 -- I'm going to try to keep that updated with the
output of this discussion.
What I am after is something akin to the debian package "provides"
property. When a Debian system needs an MTA, most packages shouldn't care
what MTA is installed, just that "MTA" as a feature is installed. I can
install any of exim, postfix, sendmail, qmail. The package name is still
"exim" or "postfix" or whatever, but they all provide a "mta" package
(which doesn't really exists, it's just so that it can be used as a
dependency). So when logwatch needs to make sure a MTA is installed to send
mails about the logs, it doesn't care which one, as long as *something*
provides a mail feature.
In the context of puppet modules, we could have competing modules offering
similar features, and a module that needs that feature, but doesn't care
which one is being used, as long as one *is*.
The example I have is around this:
Sssd and nslcd are both systems to get user information out of ldap/active
directory. They can't be installed together, and some other modules needs
to make sure some sort of auth has been setup prior doing the changes...
One module for sssd:
class sssd as auth {
# setup sssd
}
One module for nslcd:
class nslcd as auth {
# setup nslcd
}
And one module that needs one of them:
class ssh_authz {
require auth
# setup some ssh authz that require one of the auth module to be applied
}
Then we have some nodes:
node nodeSSSD {
# do the right thing here... even if this is coming from ENC in whatever
order
include sssd
include ssh_authz
}
node nodeNSLCD {
# still should be able to apply in the right sequence based on the
require in ssh_authz
include ssh_authz
include nslcd
}
node broken-missing {
# fails because nothing provides "auth" that's required...
include ssh_authz
}
node broken-dups {
# duplicate resources, as both sssd and nslcd show up as "auth"
include sssd
include ssh_authz
include nslcd
}
I hope this could be useful especially around modules that potentially
provide similar features. If i provide a module for installing a piece of
software that requires a DB, we could simply say that we need some DB
module (and maybe some default, if none exists for the "puppet module
install". Maybe I have a "mysql" module that's pretty simple, and maybe
there is another one with much more control, and just need one of them for
that purpose...
hoping for a lively discussion around this...
Thanks,
Jok
--
You received this message because you are subscribed to the Google Groups
"Puppet Developers" 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-dev/6eab86cf-b9b3-4ab8-8110-a2e016733fd0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.