Facter - command /usr/bin/facter

Module for the parsing of output from the facter command. Data is avaliable as a dict for each line of the output.

Sample input data for the facter command looks like:

architecture => x86_64
bios_vendor => Phoenix Technologies LTD
bios_version => 6.00
domain => example.com
facterversion => 1.7.6
filesystems => btrfs,ext2,ext3,ext4,msdos,vfat,xfs
fqdn => plin-w1rhns01.example.com
hostname => plin-w1rhns01
ipaddress =>
ipaddress_ens192 =>
ipaddress_lo =>
is_virtual => true
kernel => Linux
kernelmajversion => 3.10


>>> facts_info = shared[facter]
>>> facts_info.kernelmajversion
>>> facts_info.domain
>>> facts_info.architecture
class insights.parsers.facter.Facter(context, extra_bad_lines=None)[source]

Bases: insights.core.LegacyItemAccess, insights.core.CommandParser

Class for parsing facter command output.

Attributes are the facts in each line of the command output. All facts may be accessed as obj.fact_name. The get method is also provided to access any facts.


Main parsing class method which stores all interesting data from the content.


content (context.content) -- Parser context content


dictionary with parsed data

Return type