Forge Home

factcache

Factcache caches facter facts locally for 3rd party offline integration in both YAML and JSON.

7,888 downloads

7,720 latest version

4.9 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.1.1 (latest)
  • 0.1.0
released Jun 7th 2016
This version is compatible with:
  • Puppet Enterprise >=3.2.0 < 2016.0.0
  • Puppet >= 3.0.0
  • , , , , , , ,

Start using this module

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

Add this module to your Puppetfile:

mod 'bryana-factcache', '0.1.1'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add bryana-factcache
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install bryana-factcache --version 0.1.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

bryana/factcache — version 0.1.1 Jun 7th 2016

Table of Contents

  1. Overview
  2. Setup - The basics of getting started with factcache
  3. Usage - Configuration options and additional functionality
  4. Reference - An under-the-hood peek at what the module is doing and how
  5. Limitations - OS compatibility, etc.

Overview

Factcache caches facter facts locally for 3rd party offline integration in both YAML and/or JSON format. Cron jobs are setup to keep local cache in sync.

Setup

What factcache affects

  • Cron jobs are setup, 1 job per file type.
  • /var/cache/facts is created to store cache files.
  • facts.yaml - Default YAML file name.
  • facts.json - Default JSON file name.
  • YAML or JSON cron jobs can be disabled if you only want type.

Setup Requirements

This module requires puppetlabs-stdlib.

Usage

To cache facts in both YAML and JSON format:

class { 'factcache': }

To cache facts in YAML only:

class { 'factcache': 
  json => false,
  yaml => true, # implied
}

To cache facts in JSON only:

class { 'factcache': 
  json => true, # implied
  yaml => false,
}

Reference

List of classes, types, providers, facts, etc contained in this module.

  • factcache::json - Boolean. To cache in JSON or not. Default: true.
  • factcache::yaml - Boolean. To cache in YAML or not. Default: true.
  • factcache::file_json - JSON file name. Default: facts.json.
  • factcache::file_yaml - YAML file name. Default: facts.yaml.
  • factcache::minute - Array, minutes to run the cron job(s). Default: [00,59].
  • factcache::params::mode - File mode, default: 0664.
  • factcache::params::owner - File owner, default: root.
  • factcache::params::group - File group , default: root.

Limitations

Unix family OS support only right now but it could be adapted for Windows.