Native facts (written in Ruby using the Facter module) go into lib/facter/,
while custom facts (either static text files or scripts in the language of
your choice) go into facts.d/.
Facts are computed before each Puppet run. If Puppet installs a package and
your fact returns the version of that package, then the fact value will be
available after the second Puppet run.
Cheers,
Raphaƫl
On Tuesday, February 17, 2015 at 4:48:13 PM UTC+1, Salty Old Cowdawg wrote:
>
> First: I notice in the documentation you can have facts in
> ${module_path}/lib and in ${module_path}/facts.d. What is the difference
> between the two?
>
> Second: A module that I am writing as I type this is going to have some
> custom facts to keep a system auditor I work with happy. It "detects" the
> existence of a package being installed along with the version if it is
> installed. Since the primary reason for the module is to install and
> configure the package and from my understanding facts run before other
> stuff is there a way to trigger a redo of the fact?
>
> In other words:
>
> Before puppet run:
> my-packge-installed = false
> my-package-version = null
>
> <puppet runs>
> my-package-installed = true
> my-package-version = 0.5.0
>
> I hope this makes some sort of sense.
>
>
> --
>
> Peter L. Berghold [email protected] <javascript:>
>
> h <http://blog.berghold.net>ttp://science-fiction.berghold.net
>
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/456dcf6a-7017-4999-bc79-73c2662c7218%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.