factcache

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

Bryan Andrews

bryana

6,544 downloads

6,456 latest version

4.9 quality score

Version information

  • 0.1.1 (latest)
  • 0.1.0
released Jul 3rd 2019
This version is compatible with:
  • Puppet Enterprise >=3.2.0 < 2016.0.0
  • Puppet >= 3.0.0
  • Amazon
    ,
    Ubuntu
    ,
    OracleLinux
    ,
    Scientific
    ,
    SLES
    ,
    Debian
    ,
    RedHat
    ,
    CentOS

Start using this module

Documentation

bryana/factcache — version 0.1.1 Jul 3rd 2019

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.