Facter: CLI
NOTE: This page was generated from the Puppet source code on 2026-04-06 14:56:23 +0200
.Dd Apr 06, 2026 .Dt FACTER 1 .Os .Sh NAME .Nm facter .Nd collect and display facts about the current system .Sh SYNOPSIS .Nm .Op Ar options .Op Ar query … .Nm .Fl Fl version .Nm .Fl Fl list-block-groups .Nm .Fl Fl list-cache-groups .Nm .Fl Fl help .Sh DESCRIPTION .Nm is a command-line tool that gathers basic facts about nodes (systems) such as hardware details, network settings, OS type and version, and more. These facts are made available as variables in your Puppet manifests and can be used to inform conditional expressions in Puppet. .Pp If no queries are given, then all facts will be returned. .Pp Many of the command line options can also be set via the HOCON config file. This file can also be used to block or cache certain fact groups. .Sh OPTIONS .Bl -tag .It Fl Fl color Enable color output. .It Fl Fl no-color Disable color output. .It Fl c , Fl Fl config= Ns Ar value The location of the config file. .It Fl Fl custom-dir= Ns Ar value A directory to use for custom facts. .It Fl d , Fl Fl debug Enable debug output. .It Fl Fl external-dir= Ns Ar value A directory to use for external facts. .It Fl Fl hocon Output in Hocon format. .It Fl j , Fl Fl json Output in JSON format. .It Fl l , Fl Fl log-level= Ns Ar value Set logging level. Supported levels are: none, trace, debug, info, warn, error, and fatal. .It Fl Fl no-block Disable fact blocking. .It Fl Fl no-cache Disable loading and refreshing facts from the cache .It Fl Fl no-custom-facts Disable custom facts. .It Fl Fl no-external-facts Disable external facts. .It Fl Fl no-ruby Disable loading Ruby, facts requiring Ruby, and custom facts. .It Fl Fl trace Enable backtraces for custom facts. .It Fl Fl verbose Enable verbose (info) output. .It Fl Fl show-legacy Show legacy facts when querying all facts. .It Fl y , Fl Fl yaml Output in YAML format. .It Fl Fl strict Enable more aggressive error reporting. .It Fl t , Fl Fl timing Show how much time it took to resolve each fact .It Fl Fl sequential Resolve facts sequentially .It Fl Fl http-debug Whether to write HTTP request and responses to stderr. This should never be used in production. .It Fl p , Fl Fl puppet Load the Puppet libraries, thus allowing Facter to load Puppet-specific facts. .El .Sh FILES .Bl -tag .It /etc/puppetlabs/facter/facter.conf A HOCON config file that can be used to specify directories for custom and external facts, set various command line options, and specify facts to block. See example below for details, or visit the GitHub README. .Sh EXAMPLES Display all facts: .Bd -literal -offset indent $ facter disks => { sda => { model => “Virtual disk”, size => “8.00 GiB”, size_bytes => 8589934592, vendor => “ExampleVendor” } } dmi => { bios => { release_date => “06/23/2013”, vendor => “Example Vendor”, version => “6.00” } } […] .Ed .Pp Display a single structured fact: .Bd -literal -offset indent $ facter processors { count => 2, isa => “x86_64”, models => [ “Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz”, “Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz” ], physicalcount => 2 } .Ed .Pp Display a single fact nested within a structured fact: .Bd -literal -offset indent $ facter processors.isa x86_64 .Ed .Pp Display a single legacy fact. Note that non-structured facts existing in previous versions of Facter are still available, but are not displayed by default due to redundancy with newer structured facts: .Bd -literal -offset indent $ facter processorcount 2 .Ed .Pp Format facts as JSON: .Bd -literal -offset indent $ facter –json os.name os.release.major processors.isa { “os.name”: “Ubuntu”, “os.release.major”: “14.04”, “processors.isa”: “x86_64” } .Ed .Pp An example config file: .Bd -literal -offset indent
always loaded (CLI and as Ruby module)
global : { external-dir : “~/external/facts”, custom-dir : [ “~/custom/facts”, “~/custom/facts/more-facts” ], no-external-facts : false, no-custom-facts : false, no-ruby : false }
loaded when running from the command line
cli : { debug : false, trace : true, verbose : false, log-level : “info” }
always loaded, fact-specific configuration
facts : { # for valid blocklist entries, use –list-block-groups blocklist : [ “file system”, “EC2” ], # for valid time-to-live entries, use –list-cache-groups ttls : [ { “timezone” : 30 days } ] } .Ed