.\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . .TH "FACTER" "8" "July 2021" "Puppet, Inc." "Facter manual" . .SH "NAME" facter \- collect and display facts about the current system . .SH "SYNOPSIS" \fBfacter\fR [options] [query] [query] [\.\.\.] . .SH "DESCRIPTION" \fBfacter\fR 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\. . .P If no queries are given, then all facts will be returned\. . .P 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" . .TP \fB\-\-color\fR: . .IP Enable color output\. . .TP \fB\-\-no\-color\fR: . .IP Disable color output\. . .TP \fB\-c\fR, \fB\-\-config\fR: . .IP The location of the config file\. . .TP \fB\-\-custom\-dir\fR: . .IP A directory to use for custom facts\. . .TP \fB\-d\fR, \fB\-\-debug\fR: . .IP Enable debug output\. . .TP \fB\-\-external\-dir\fR: . .IP A directory to use for external facts\. . .TP \fB\-\-hocon\fR: . .IP Output in Hocon format\. . .TP \fB\-j\fR, \fB\-\-json\fR: . .IP Output in JSON format\. . .TP \fB\-l\fR, \fB\-\-log\-level\fR: . .IP Set logging level\. Supported levels are: none, trace, debug, info, warn, error, and fatal\. . .TP \fB\-\-no\-block\fR: . .IP Disable fact blocking\. . .TP \fB\-\-no\-cache\fR: . .IP Disable loading and refreshing facts from the cache . .TP \fB\-\-no\-custom\-facts\fR: . .IP Disable custom facts\. . .TP \fB\-\-no\-external\-facts\fR: . .IP Disable external facts\. . .TP \fB\-\-no\-ruby\fR: . .IP Disable loading Ruby, facts requiring Ruby, and custom facts\. . .TP \fB\-\-trace\fR: . .IP Enable backtraces for custom facts\. . .TP \fB\-\-verbose\fR: . .IP Enable verbose (info) output\. . .TP \fB\-\-show\-legacy\fR: . .IP Show legacy facts when querying all facts\. . .TP \fB\-y\fR, \fB\-\-yaml\fR: . .IP Output in YAML format\. . .TP \fB\-\-strict\fR: . .IP Enable more aggressive error reporting\. . .TP \fB\-t\fR, \fB\-\-timing\fR: . .IP Show how much time it took to resolve each fact . .TP \fB\-\-sequential\fR: . .IP Resolve facts sequentially . .TP \fB\-p\fR, \fB\-\-puppet\fR: . .IP Load the Puppet libraries, thus allowing Facter to load Puppet\-specific facts\. . .TP \fB\-\-version, \-v\fR: . .IP Print the version . .TP \fB\-\-list\-block\-groups\fR: . .IP List block groups . .TP \fB\-\-list\-cache\-groups\fR: . .IP List cache groups . .TP \fB\-\-help, \-h\fR: . .IP Help for all arguments . .SH "FILES" \fI/etc/facter/facter\.conf\fR . .P 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 \fIhttps://github\.com/puppetlabs/puppetlabs\-hocon#overview\fR\. . .SH "EXAMPLES" Display all facts: . .IP "" 4 . .nf $ 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" } } [\.\.\.] . .fi . .IP "" 0 . .P Display a single structured fact: . .IP "" 4 . .nf $ 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 } . .fi . .IP "" 0 . .P Display a single fact nested within a structured fact: . .IP "" 4 . .nf $ facter processors\.isa x86_64 . .fi . .IP "" 0 . .P 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: . .IP "" 4 . .nf $ facter processorcount 2 . .fi . .IP "" 0 . .P Format facts as JSON: . .IP "" 4 . .nf $ facter \-\-json os\.name os\.release\.major processors\.isa { "os\.name": "Ubuntu", "os\.release\.major": "14\.04", "processors\.isa": "x86_64" } . .fi . .IP "" 0 . .P An example config file\. . .IP "" 4 . .nf # 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 } ] } . .fi . .IP "" 0