Forge Home

facts

Tasks that inspect the value of system facts

341,649 downloads

4,396 latest version

4.6 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

  • 1.6.0 (latest)
  • 1.5.0
  • 1.4.0
  • 1.3.0
  • 1.2.0
  • 1.1.0
  • 1.0.0
  • 0.6.0
  • 0.5.1
  • 0.5.0
  • 0.4.1
  • 0.3.1
  • 0.2.0
  • 0.1.2
  • 0.1.0
released Jun 7th 2018
This version is compatible with:
  • Puppet Enterprise 2018.1.x, 2017.3.x
  • Puppet >= 5.1.0 < 6.0.0
  • , , ,
Tasks:
  • bash
  • powershell
  • ruby
Plans:
  • facts
  • info
  • retrieve

Start using this module

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

Add this module to your Puppetfile:

mod 'puppetlabs-facts', '0.1.2'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add puppetlabs-facts
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install puppetlabs-facts --version 0.1.2

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

puppetlabs/facts — version 0.1.2 Jun 7th 2018

facts

Table of Contents

  1. Description
  2. Requirements
  3. Usage
  4. Reference - An under-the-hood peek at what the module is doing and how

Description

This module provides a collection of facts plans all of which retrieve facts from the specified nodes but each of them processes the retrieved facts differently (if at all). The provided plans are:

  • facts - retrieves the facts and then stores them in the inventory, returns a result set wrapping result objects for each specified node which in turn wrap the retrieved facts
  • facts::info - retrieves the facts and returns information about each node's OS compiled from the os fact value retrieved from that node
  • facts::retrieve - retrieves the facts and without further processing returns a result set wrapping result objects for each specified node which in turn wrap the retrieved facts (this plan is internally used by the other two)

Requirements

This module is compatible with the version of Puppet Bolt it ships with.

Usage

To run the facts plan run

bolt plan run facts --nodes node1.example.com,node2.example.com

Parameters

All plans have only one parameter:

  • nodes - The nodes to retrieve the facts from.

Reference

The core functionality is implemented in the facts::retrieve plan, which runs the facts::bash task for ssh:// (and possibly local:// if the bash shell is available on the local host) targets, the facts::powershell task for winrm:// targets and facts::ruby for pcp:// targets. Other targets are currently not supported. The tasks either run facter --json command if facter is available on the target and return its output or - as a fallback - compile and return information mimicking that provided by the facter's os fact. The plan then collects the results of the task runs on the individual nodes and returns them wrapped in a ResultSet object.