Forge Home

facter_conf

A Puppet module for managing Facter related configuration (facter.conf)

824 downloads

90 latest version

3.1 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.3.0 (latest)
  • 1.2.0
  • 1.1.0
  • 1.0.0
released Aug 8th 2024
This version is compatible with:
  • Puppet Enterprise 2023.8.x, 2023.7.x, 2023.6.x, 2023.5.x, 2023.4.x, 2023.3.x, 2023.2.x, 2023.1.x, 2021.7.x
  • Puppet >= 7.24 < 9.0.0
  • , , , , , ,
Tasks:
  • clear_facter_cache_data
  • delete_facter_conf

Start using this module

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

Add this module to your Puppetfile:

mod 'jortencio-facter_conf', '1.3.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add jortencio-facter_conf
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install jortencio-facter_conf --version 1.3.0

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
Tags: cache, facter

Documentation

jortencio/facter_conf — version 1.3.0 Aug 8th 2024

Reference

Table of Contents

Classes

Tasks

  • clear_facter_cache_data: A task for clearing out facter cache
  • delete_facter_conf: A task for deleting facter.conf. This is useful for when Puppet/Facter runs are failing due to a malformed/incorrect facter.conf file

Classes

facter_conf

Configures facter.conf based on settings available at https://www.puppet.com/docs/puppet/latest/configuring_facter.html

Examples

include facter_conf

Parameters

The following parameters are available in the facter_conf class:

facter_conf_ensure

Data type: Enum['present','absent']

Sets whether to ensure facter.conf is present or absent

Default value: 'present'

config_path

Data type: String[1]

Path for configuring facter.conf

Default value: '/etc/puppetlabs/facter'

owner

Data type: String[1]

Owner of facter.conf file

Default value: 'root'

group

Data type: String[1]

Group of facter.conf file

Default value: 'root'

mode

Data type: String[1]

Mode of facter.conf file

Default value: '0644'

facts_blocklist

Data type: Optional[Array[String[1]]]

Optional array for setting facts to block

Default value: undef

facts_ttls

Data type: Optional[Array[Hash]]

Optional array of hashes for setting the time to live (ttl) for given facts. This will cache the facts listed for the given duration.

Default value: undef

global_external_dir

Data type: Optional[Array[String[1]]]

Optional array of paths to search in for external facts

Default value: undef

global_custom_dir

Data type: Optional[Array[String[1]]]

Optional array of paths to search in for custom facts

Default value: undef

global_no_external_facts

Data type: Optional[Boolean]

Optional boolean. If true, prevents Facter from searching for external facts.

Default value: undef

global_no_custom_facts

Data type: Optional[Boolean]

Optional boolean. If true, prevents Facter from searching for custom facts.

Default value: undef

global_no_ruby

Data type: Optional[Boolean]

Optional boolean. If true, prevents Facter from loading its Ruby functionality.

Default value: undef

cli_debug

Data type: Optional[Boolean]

Optional boolean. If true, Facter outputs debug messages.

Default value: undef

cli_trace

Data type: Optional[Boolean]

Optional boolean. If true, Facter prints stacktraces from errors arising in your custom facts.

Default value: undef

cli_verbose

Data type: Optional[Boolean]

Optional boolean. If true, Facter outputs its most detailed messages.

Default value: undef

cli_log_level

Data type:

Optional[
    Enum[
      'none',
      'fatal',
      'error',
      'warn',
      'info',
      'debug',
      'trace'
    ]
  ]

Sets the minimum level of message severity that gets logged. Valid options: "none", "fatal", "error", "warn", "info", "debug", "trace".

Default value: undef

fact_groups

Data type:

Optional[
    Array[
      Struct[
        {
          name => String[1],
          facts => Array[String[1]],
        }
      ]
    ]
  ]

Definition of custom fact groups which can be used for blocking (blocklist) or caching (ttls) groups of facts.

Default value: undef

Tasks

clear_facter_cache_data

A task for clearing out facter cache

Supports noop? false

delete_facter_conf

A task for deleting facter.conf. This is useful for when Puppet/Facter runs are failing due to a malformed/incorrect facter.conf file

Supports noop? false