Hi Tim,

check the existing fact scripts for network interfaces providing details as 
ipaddress_eth0, ipaddress_eth1 - this all is done by one facter script - this 
could give you an idea how to implement your facts. it can be found 
at /usr/lib/ruby/site_ruby/1.8/facter/interfaces.rb (depending on your 
installation)...

Antony.



________________________________
From: Tim <[email protected]>
To: Puppet Users <[email protected]>
Sent: Wed, 14 July, 2010 15:57:42
Subject: [Puppet Users] Adding multiple custom facts for use in any module

Hi,

We have a config file on each of our machines which lists the
'products' (in house software) that are installed on each machine.
Puppet needs to know which are installed to be able to put together a
config, the file looks something like:
PRODUCT_PRODUCT1="true"
PRODUCT_PRODUCT2="false"
...

I want to create a series of facts (product1=true etc.) from this
file.

Is it possible to create a plugin that creates multiple facts? ( the
documentation only deals with one that creates a single FAQ -
http://projects.puppetlabs.com/projects/puppet/wiki/Adding_Facts )

Where should I put this file so that it's available everywhere? It
doesn't really fit into one module since it should be available
globally.

Thanks

-- 
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.


      

-- 
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.

Reply via email to