summaryrefslogtreecommitdiff
path: root/lib/puppet/functions/fact.rb
AgeCommit message (Collapse)Author
2017-07-03Revert "Allow use of fact() on other hashes"Reid Vandewiele
This reverts commit 409a974095a3f5b637e091494b5d14b451c5de78. After thinking about this, use case, and function naming, I think it's probably best for now to keep things simple and let `fact()` be single-purpose for looking up facts with no potentially confusing extensions. The only use case where the name makes sense is where it's being used on the `$facts` hash, and I think we'd rather in that circumstance promote the raw use of `fact()`.
2017-06-30(FACT-932) Allow use of fact() on other hashesReid Vandewiele
Because sometimes people want to use an alternative data set, but treat it like it's a set of facts.
2017-06-30(FACT-932) Add new function, fact()Reid Vandewiele
The fact() function allows dot-notation reference to facts. It is an alternative to using $facts directly with array-indexing. Array-indexing is often onerous to use since it doesn't align with how structured facts are accessed elsewhere in the ecosystem and if any element in a multi-step path doesn't exist, array indexing can cause a compilation failure. Example usage: fact('os.family')