FACTERDB(1)
β¨ FACTERDB(1) β¨
okay bestie, so the facterdb manual page (section 1, we stan a classic) π β let's get into it.
πΈ NAME πΈ
facterdb β grab a JSON fact set straight out of the facterdb facts database. that's the whole vibe. π¦
β¨ SYNOPSIS β¨
facterdb <json_filter>
π DESCRIPTION π
so basically, the facterdb tool lets you pull a JSON-formatted data structure out of the facts database that the facterdb library provides. that's it, that's the job. πβοΈ
and how do you pick which facts you want? you use a filter, and that filter has to be formatted properly for jgrep. no cap β the filter is a jgrep filter, so format it like one. π₯
π ENVIRONMENT VARIABLES π
FACTERDB_SEARCH_PATHS
a list of paths that hold external facts, and those external facts will complement the default facterdb database. β¨
when you're separating the paths, pls use the default path separator character that your OS supports, okay?
- Unix/Linux/OSX =
: - Windows =
;
and every single fact set you create has to meet these requirements, no skipping:
- A JSON serialized file containing a single Hash of all the facts.
- The facts file must end in
.facts - Must be placed inside some directory. You can organize this directory however you like.
FACTERDB_SKIP_DEFAULTDB
if this variable is set (to any value at all, doesn't matter what), it tells facterdb to not look at its built-in facts. super useful if you need to completely replace which facts are being used. π«Ά
and lowkey? you'd most likely use this in combination with the FACTERDB_SEARCH_PATHS environment variable. that's the iconic duo right there. π
FACTERDB_INJECT_SOURCE
if this environment variable is set to any value, the following facts get injected into all fact sets:
_facterdb_path: The base name of the file used to load this fact set e.g.centos-5-i386.facts_facterdb_filename: The full path of the file used to load this fact set e.g./project/facter-db/centos-5-i386.facts
π EXAMPLES π
get facts for facter 2.4 that are either from Debian 7 or RedHat 7 β look at this filter, it's giving main character energy fr fr:
facterdb 'facterversion=/^2.4\./ and (operatingsystem=Debian and operatingsystemrelease>=7 or operatingsystem=RedHat and operatingsystemrelease=/^7/)'
π SEE ALSO π
π AUTHOR π
Gabriel Filion β thank you for your service, king π«‘π
and that's a wrap on the facterdb(1) girlies!! this page is dated 2020, source/version info said so, and honestly it ate. mwah, bye bestie π β¨π
π¦ where this page comes from
- debian bookworm: facterdb 1.12.1-1 Β· Apache-2.0
- debian trixie: facterdb 1.12.1-1 Β· Apache-2.0
- ubuntu jammy: facterdb 1.12.1-1 Β· Apache-2.0
- ubuntu noble: facterdb 1.12.1-1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms