Module to manage external facts

Andrew Grimberg



447 latest version

5.0 quality score

Version information

  • 2.0.1 (latest)
  • 2.0.0
released Apr 27th 2021
This version is compatible with:
  • Puppet Enterprise 2021.2.x, 2021.1.x, 2021.0.x, 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x, 2017.3.x, 2017.2.x, 2016.4.x
  • Puppet >= 4.10.0 < 8.0.0
  • CentOS

Start using this module


tykeal/external_facts — version 2.0.1 Apr 27th 2021


Table of Contents

  1. Overview
  2. Module Description - What the module does and why it is useful
  3. Usage - Configuration options and additional functionality
  4. Limitations - OS compatibility, etc.
  5. Development - Guide for contributing to the module


Build Status Puppet Forge

The external facts module is a simple wrapper around Facter 1.7+ support for external facts.

This module is a fork of the datacentred/external_facts module as Datacentred went out of business in 2017 and the module is now effectively abandoned.

Module Description

The external facts module installs supporting directory structures and creates external facts on demand. These are defined on your hosts by puppet DSL and on subsequent runs are sent to the master for use in manifest compilation. If the fact definition is removed the fact is automatically purged and will become absent in subsequent puppet runs.


Enabling Support

Hosts must declare the directory management portion of the module if they want non-existant facts to be purged and no facts are being pushed.

include ::external_facts

NOTE: As long as there is at least one fact being created auto-purging of other non-manged facts will occur even if the base class is not included

Creating facts

This can either be with an implicit value of true

external_facts::fact { 'a_fact': }

or may be declared with an explicit value for use elsewhere

external_facts::fact { 'servicegroups':
  value => 'http,https',

As of version 2.0 you may now define the facts as well as fact scripts via hiera as follows:

# define facts to be layed down
        value: true
        value: http,https

# define scripts to be layed down
        content: |
            echo FOO=bar
        source: puppet:///modules/profile/facts/source-facts.sh


This module should work on all GNU Linux systems, but has only been tested on Ubuntu and RedHat.


Development for this module is happening at https://github.com/tykeal/puppet-external-facts

To contribute please open a Pull Request

A DCO line indicated by a Signed-off-by in the commit footer of every commit of a patch series, not just your merge request is required. If any of the commits in the series do not contain this, the request will be rejected.

Pre-commit is used by this repository to enforce code cleanliness. Please make sure you have installed it as well as the commit-msg hooks. If pre-commit validation fails the PR will be rejected and only accepted after code changes as amended updates (no add on fix-up commits that repair bad something that would have been caught by pre-commit)