Hello Richard,

Am 22.10.2010 02:41, schrieb Richard Crowley:
> On Thu, Oct 21, 2010 at 5:17 PM, Matt Wise <w...@wiredgeek.net> wrote:
>> I have a scenario where I'd like to pull in a hash table from an external 
>> file (really, a generate() function.. but for testing purposes, a file will 
>> do)... is there any way to do that?
> 
> You probably want the extlookup function:
> 
> http://docs.puppetlabs.com/references/latest/function.html#extlookup

i do not think that "extlookup" is the solution we are looking for,
because it is not powerful enough.

For some kind of modules you will need the relation between host an ip,
or host an service. At the moment, i am using a bunch of if/else cases,
but a hash or function which is parsing a *.yaml file would be more
powerful.

The Debian project has found a nice way to handle this.

http://git.debian.org/?p=mirror/dsa-puppet.git;a=blob_plain;f=manifests/site.pp;hb=HEAD

http://git.debian.org/?p=mirror/dsa-puppet.git;a=tree;f=files/etc/puppet/lib/puppet/parser/functions;hb=HEAD

Regards, Dennis

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to