Re: [Puppet-dev] Re: utilizing custom type for fact values

2015-09-18 Thread John Bollinger
On Friday, September 18, 2015 at 8:54:24 AM UTC-5, Trevor Vaughan wrote: > > Hi Kylo, > > I've never used this approach since I took the assumption that my facts > may be used outside of/before all of my Puppet manifests were fully > installed. > > It did, at times, dictate either code duplicat

Re: [Puppet-dev] Re: utilizing custom type for fact values

2015-09-18 Thread Corey Osman
I saw a fact recently that utilized the package type to lookup if a package was installed. It seemed like a cool hack considering the amount of code it takes to see if a package is installed on windows. So I thought I might see if I could do the same thing with my bmc type. My other approach i

Re: [Puppet-dev] Re: utilizing custom type for fact values

2015-09-18 Thread Trevor Vaughan
Hi Kylo, I've never used this approach since I took the assumption that my facts may be used outside of/before all of my Puppet manifests were fully installed. It did, at times, dictate either code duplication or the creation of an external Ruby Gem that both could use that would be installed via

Re: [Puppet-dev] Re: utilizing custom type for fact values

2015-09-17 Thread Kylo Ginsberg
On Thu, Sep 17, 2015 at 11:27 AM, wrote: > On Wednesday, September 16, 2015 at 10:11:16 PM UTC-5, Corey Osman wrote: >> >> 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

[Puppet-dev] Re: utilizing custom type for fact values

2015-09-17 Thread jeremiah . powell
On Wednesday, September 16, 2015 at 10:11:16 PM UTC-5, Corey Osman wrote: > > 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] > confin