This module is only of use for historical reasons and for older Puppet releases. Puppet has included native structured facts for several years now. If you are anywhere near current, please use those instead!
This simply parses JSON encoded facts into Puppet data structures and exposes them as global variables. It doesn't provide any functionality on its own. You have to write custom facts for it to parse.
Three sample facts are included:
- Exposes a hash of mountpoints and filesystem stats
- Exposes a hash of IP addresses keyed off interface names
- Just like built-in
interfacesfact, but an array instead of a string
- Just like built-in
- Put this module in your modulepath.
- Add a call to
decode_structured_facts()near the top of
- Write custom facts that return JSON. Prepend
encoded_to your fact names.
- It does very little error checking.
- Author: Ben Ford
- Email: firstname.lastname@example.org
- Twitter: @binford2k
- IRC (Freenode): binford2k
Copyright (c) 2013 Puppet Labs, email@example.com
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.