FACTERDB(1)

πŸ“¦
version 1.12.1 Β· 2 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble

✨ 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