Often in a Puppet manifest, you need to know some local information about the machine you're on. Facter is the tool that accompanies Puppet to provide a standard way of getting information (facts) from the environment about things such as the following:
- Operating system
- Memory size
- Architecture
- Processor count
To see a complete list of the facts available on your system, run the following code:
$ sudo facter aio_agent_version => 5.5.3 augeas => {
version => "1.8.1" } ...
While it can be handy to get this information from the command line, the real power of Facter lies in being able to access these facts in your Puppet manifests.
Some modules define their own facts; to see any facts that have been defined locally, add the -p
(pluginsync) option to facter
, as follows:
$ sudo facter -p
This is deprecated in Puppet5. To access facts defined in puppet, use the puppet facts
face instead:
$ puppet facts