On Thu, Sep 26, 2013 at 6:45 AM, Andy Parker <[email protected]> wrote:
> On Wed, Sep 25, 2013 at 7:59 PM, John Julien <[email protected]>wrote: > >> 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} >> >> > Agreed, the last thing that is needed is to present a solution that we say > is to make things "easier" and then have people start the simple case by > having to learn an abstract language expressed in data structures :) > > How about a hybrid approach: > > myfacts.sh > myfacts.meta > > where meta can still contain the description, confine, etc. However > instead of immediately forcing the author to write s-expressions they can > do a simplified version as you propose. That way, we can start with the > simple equality matching (that is what a hash as the value of the confine > means), and grow to the full expressions (which would be arrays at the > value of the confine) if the need arises. > > Are there any ordering entanglements? Specifically on http://docs.puppetlabs.com/guides/custom_facts.html, there's the statement "An external fact cannot internally reference another fact. However, due to parse order, you can reference an external fact from a Ruby fact." The directory-per-kernel approach does rely on the kernel fact but that could be determined early, whereas this approach allows a dependency on arbitrary facts (I think). Related, do we have uses cases in mind for more sophisticated confines? I got the original concern about linux vs windows facts causing unwanted error messages, but beyond that I don't have a feel for the likelihood that, say, hybrid linux environments would get tripped up by distro-specific external facts returning garbage on the wrong distro, etc. Kylo -- 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.
