Hi David,
2011/10/3 David Ressman <[email protected]>
> [...]
> I'm currently redoing our puppet setup and trying to start with new design
> from the ground up to implement all of the puppet 2.6+ goodness, but I'm
> getting tripped up with the complexity of the design. I want to do things
> the right way, but I don't want to introduce additional complexity, which is
> what I feel like I'm doing. The best example I can come up with is for an
> NTP module, since puppet docs use it a lot. I'll just describe how I imagine
> it should work from my understanding of the style guide and the
> parameterized class documentation, and hopefully someone can help clear it
> up a bit by either telling me I'm on the right track or that I'm hitting the
> crack pipe a bit too hard. For the sake of simplicity, I've left out
> ntp::server, but it looks the same as ntp::client.
> [...]
>
since I switched to Eclipse/Gepetto module development I do something like
this fo init.pp:
# Class: backup
#
# This module manages backup
#
# Parameters: usageType
#
# Actions: Setup backup
#
# Requires: common module
#
# Sample Usage: class { backup: usageType = "baculaClient" }
#
# [Remember: No empty lines between comments and class definition]
class backup(
$usageType = "none"
) {
#todo: ZZZ Module finished but untested
$localOS = $operatingsystem ? {
CentOS => true,
RedHat => true,
Scientific => true
}
if $localOS {
case $usageType {
"baculaServer": {
include backup::bacula
include backup::bacula::client
include backup::bacula::server
}
"baculaStorage": {
include backup::bacula
include backup::bacula::storage
}
"baculaClient": {
include backup::bacula
include backup::bacula::client
}
}
} else {
notice("$localOS not support in module $module_name")
}
}
So I use a service based setup instead of a product based setup. It is not
final because the main idea is to say, this node should get a backup client
and a site specific configuration decide which product should be used. The
main problem from my point of view is to find a design approach which
strictly separate generic from site specific code but I'm still in a design
development phase ;).
Regards, Thomas
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" 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-users?hl=en.