Hi again,
On 03/20/2013 01:56 PM, Kubes wrote:
> You may get away with declaring a subclass instead, and have class
> mysql::service include that subclass in order to achieve the necessary
> modification.
>
> I was checking for a subclass "mysql::service"
Not really. The class is named mysql::service, but I sincerely hope it
is not inheriting anything.
Point in fact - if you are not yet very keen on inheritance and how it
works, I advise to steer clear for the moment.
> Otherwise, your best choice is probably external data, as in hiera.
>
> Thanks, but I dont understand how heira solve the issues, can you please
> elaborator a bit for me? I an using heira for storing my user info, but
> I dont know how to use it to handle if a node is a db server, etc?
You have it working already? Excellent!
The idea is simple: Introduce a hiera value that, for each node, tells
it whether it is a mysql server or not.
Each last of your nodes can then e.g.
if hiera("mysql-server") == "true" { include mysql }
It is now trivial to use the same hiera value in other places.
> How have you come to understand this? I would have thought that Class[]
> is fine.
>
>
> Via post on this group and the documentation. Using Resource[] is only
> needed for resource refferences, as I understand it.
> http://docs.puppetlabs.com/references/latest/function.html#defined
Ah, misunderstanding.
defined() will tell you whether the class *exists*, not if this node has
included the class. (At least that's what I make of the documentation).
HTH,
Felix
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" 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-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.