Hi John,

You can use other nodes' exported resources, if there are any, but you
> cannot use other nodes' facts.  Multiple nodes can use the same data,
> however, by obtaining them from the same source, be it global
> variables, class variables, or external data (e.g. extdata or hiera).
>

Understood.


> I don't quite follow that.  "References"?  Do you mean that class
> some::app::db relies on a template that interpolates the value of the
> db_host parameter?
>

Yes.


> On the contrary, in your example you will have that problem all the
> time.  It doesn't matter what classes have been applied to other
> nodes.  Only classes applied to the same node are accessible to each
> other.  For your example to work, therefore, classes 'my_mysql_server'
> and 'some::app::db' would need to be applied to the same node, and
> each would see the other in the form they were applied to that node.
> In that case you don't need to rely on information about other nodes,
> so the question is moot.
>

OK, I understand now. Thank you.


> Hard coding it is the quick and dirty way.  It's not necessarily
> wrong, but it will make your manifests more difficult to maintain as
> they grow in number and complexity.
>
> You can instead use an external node classifier to declare your
> classes and their parameters.  That does require you to write or
> obtain an ENC, set it up for your configuration, etc.  Foreman is one
> possibility there, and the Puppet Dashboard provides another.
>
> If you're not already using an ENC, however, then I would recommend
> putting the DB server name into an external data store and reading it
> into your manifest via a Puppet function.  The built-in extlookup()
> function provides an approach of this sort.  Hiera provides a more
> flexible approach of the same kind, and it will be a built-in starting
> with the next major version of Puppet (Telly).
>

Thank you for the options - it's appreciated.

Joe


-- 
Joe Topjian
Systems Administrator
Cybera Inc.

www.cybera.ca

Cybera is a not-for-profit organization that works to spur and support
innovation, for the economic benefit of Alberta, through the use
of cyberinfrastructure.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to