G'day.
I have a problem. Mostly a theoretical problem, granted, but a problem:
We have machines with a variety of hardware RAID controllers, and some that
don't have one at all. We want these monitored, which usually involves some
vendor-specific binary blob, plus support code, installed and running.
Supporting *a* RAID controller isn't too hard; I have a fact that pulls that
out and lets me install the right support.
In the event we got two RAID controllers in a single machine (or,
theoretically, I run into this elsewhere), how would I best go about this?
As far as I can tell, this doesn't work; it matches nothing, ever:
$test = ['one', 'two']
case $test {
'one': { ... }
'two': { ... }
}
So, how can I make decisions about the content of that array?
My best guess, right now, is that I would need to use a define, then expand
that using the array as the name, and have the content perform the case
statement to include the appropriate class. Ick.
define what_a_nasty_hack () {
case $name {
'one': { ... }
'two': { ... }
}
}
what_a_nasty_hack { $test: }
Anyway, is there a better way to handle this that I can't see right now, or is
this perhaps something that the language could stand enhancing?
Regards,
Daniel
--
✣ Daniel Pittman ✉ [email protected] ☎ +61 401 155 707
♽ made with 100 percent post-consumer electrons
--
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.