Is it considered bad practice to make use of a custom provider code to retrieve 
values for a fact?

example:

Facter.add("bmc_ip", :timeout => 2) do
  confine :bmc_device_present => [:true, true]
  confine :bmc_tools_present => [:true, true]
  setcode do
    
Puppet::Type.type(:bmc).instances.first.retrieve_resource.to_data_hash["parameters"][:ip]
  end
end

Since the fact and provider code overlap each other with what it gathers I was 
looking for a tool-agnostic way
to retrieve some values from the BMC device.  What I like about this is that 
the fact uses puppet to figure out 
how to retrieve the data without making the user choose a specific tool for 
fact values.



Corey 



-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-dev/C1783BD8-E297-4B69-8DD3-38D2ADC2E563%40logicminds.biz.
For more options, visit https://groups.google.com/d/optout.

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to