Forge Home

fetchfact

UNKNOWN

10,385 downloads

10,385 latest version

1.5 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Support the Puppet Community by contributing to this module

You are welcome to contribute to this module by suggesting new features, currency updates, or fixes. Every contribution is valuable to help ensure that the module remains compatible with the latest Puppet versions and continues to meet community needs. Complete the following steps:

  1. Review the module’s contribution guidelines and any licenses. Ensure that your planned contribution aligns with the author’s standards and any legal requirements.
  2. Fork the repository on GitHub, make changes on a branch of your fork, and submit a pull request. The pull request must clearly document your proposed change.

For questions about updating the module, contact the module’s author.

Version information

  • 0.0.1 (latest)
released Jan 13th 2013

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'hastexo-fetchfact', '0.0.1'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add hastexo-fetchfact
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install hastexo-fetchfact --version 0.0.1

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

hastexo/fetchfact — version 0.0.1 Jan 13th 2013

fetchfact

This module fetches a JSON, YAML or text file from a defined URL, and stores it in /etc/facter/facts.d. From there, its contents can be picked up by facter-dot-d and thus be available as custom facts to Facter.

Warning

Do not retrieve facts from untrusted sources. fetchfact does not do any sanitization or filtering on the retrieved facts. If your source provides you with facts that override other custom facts, this module does not protect you against that. If in doubt, retrieve facts only from sources that you yourself control and/or trust.

Example

To fetch a dynamically generated JSON document from http://service.example.com/something?foo=bar and store it in /etc/facter/facts.d/something.json, put the following in your manifest:

include fetchfact

$url = http://service.example.com/something?foo=bar
$factfile = something.json

fetchfact::fetch { '$filename':
  url => $url,
  factfile => $filename
}

Note that fetchfact will ensure that the required JSON Ruby module is installed if your filename ends in .json.

License

ASL 2.0.

Contact

Contact puppetforge@hastexo.com for any comments and questions about this module.

Support

Please report issues on GitHub.