>
> A third option is that an external fact has an optional metadata file
> (myfacts.sh and myfacts.meta). That file can describe things like:
>
> * What facts do you expect to get out of the script
> * What confines the script has
> * Maybe a description of it?
>
> I encountered this same question when I played around with a rewrite of
> facter (https://github.com/zaphod42/facter-rewrite) in which everything
> was an external fact. I didn't implement this, but it was what I was
> thinking of at the time.
>
> The confines can be expressed either as an s-expression style or a small
> language:
>
> {
> "confine": ["and", ["=", "osfamily", "RedHat"], ["=~",
> "kernelversion", "2\.6"]]
> }
>
> Let's just implement this for Linux :) j/k
This is an interesting proposal. A bit complicated, but as a result very
flexible. If you recall, my main selling point for this enhancement was to
include those who are not as likely to write a fact in Ruby because it is
too complex for them. With that in mind, what are your feelings on a
simplified version of this where we only allow the confine evaluation to be
a collection of fact(s) equalling a specific value. So that might look
like.
myfact.sh
myfact.sh.confine:
{'osfamily': 'RedHat', 'lsbmajdistrelease': 6}
If myfact.sh.confine doesn't exist, we could assume load it. That way
people without hybrid environments don't have to write the same confine
over and over.
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-dev.
For more options, visit https://groups.google.com/groups/opt_out.