Hi,

You can achieve that with a few options:
1. use storeconfigs, export and collection will allow your nfs clients to
export, and your nfs server to collect the list of machines.
maybe not usable if you have a large setup (or multi location puppetmaters).

2. parse the yaml files on the master (e.g. most of the node data might be
already on the master)
this will work if you have only one master

3. use external nodes tool like foreman which has a query interface, this
will allows you to query in your manifest something like
$hostlist = gethosts("class = nfs-client")

cheers,
Ohad
On Tue, Mar 23, 2010 at 6:03 AM, DieterVDW <dieter...@gmail.com> wrote:

> Hi,
>
> I'd like to hear some idea's on how to do the following with puppet:
> Suppose I have a node that implements a certain server class, eg. nfs-
> server,
> and some other nodes that implement a class nfs-client.
>
> I'd like all nodes that implement nfs-client to contain a reference to
> the node that implements nfs-server.
> (For example in the hosts file.)
>
> How do you describe this in Puppet?
> I could statically declare the IP of the node that implements as a
> global variable with a known name,
> and use this variable in nfs-client to fill in the hosts file.
> But it would be even nicer if I could refer to the ip of the node
> implementing nfs-server,
> so if the nfs-server node changes IP, the hosts files of nodes
> implementing nfs-client are updated too.
>
> Is this possible with puppet?
> Is there some kind of preferred pattern to use to express relations
> between nodes or classes?
>
> I understand how Puppet is ideal for expression the configuration of
> seperate nodes,
> but I don't quite see how to express relations yet...
>
> Best regards,
>
> Dieter
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To post to this group, send email to puppet-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> puppet-users+unsubscr...@googlegroups.com<puppet-users%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@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