Forge Home

fetchfact

UNKNOWN

10,316 downloads

10,316 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.

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.