FOREMANCLI(1)
π FOREMANCLI β the foremancli manual page π
okay bestie, so this is FOREMANCLI(1), aka the little command-line bestie that lets you search your Foreman server for all the node info it's been hoarding. no cap, it's giving very "I just want to know what's on my boxes" energy and honestly? we love that for us.
β¨ NAME β¨
foremancli β a commandline search interface to Foreman. literally that's it, that's the vibe. π
πΈ SYNOPSIS πΈ
foremancli options
π¦ DESCRIPTION π¦
You query a Foreman server for stored node information. that's the whole main character plot. pull up the tea, pick your options, and Foreman tells you what it knows. π
β¨ OPTIONS β¨
-d,--debugβ output more information. she's chatty, she's verbose, she's telling you everything.-u,--userUSER β the Foreman user. instead of putting the user on the command line you can also set theFOREMAN_USERenvironment variable. heads up though: the user you specify via the command line takes precedence over the environment variable. command line stays winning, periodt.-p,--passPASSWORD β the Foreman password. same deal as the user: you can setFOREMAN_PASSWORDinstead of passing it on the command line, and the password specified via the command line takes precedence over the environment variable. π«Ά-s,--serverURL β the Foreman Server URL. you can also set theFOREMAN_SERVERenvironment variable instead of providing the URL on the command line, and the url specified via the command line takes precedence over the environment variable. (yes, "url", lowercase, that's exactly what the manpage said, iykyk.)--jsonβ JSON output. for when you want your data in curly braces, iconic.--yamlβ YAML output. for when you want your data indented and sensitive, also iconic.--statusβ Foreman status. vibe check on the server itself. π--customCOLLECTION β a customCOLLECTIONstring, see:http://theforeman.org/projects/foreman/wiki/APIfor more information.--architecturesfilter β retrieve a list of architectures.--common_parametersfilter β retrieve a list of common_parameters.--config_templatesfilter β retrieve a list of config_templates.--domainsfilter β retrieve a list of domains.--environmentsfilter β retrieve a list of environments.--fact_valuesfilter β retrieve a list of fact_values.--hostsfilter β retrieve a list of hosts. β--hostgroupsfilter β retrieve a list of hostgroups.--mediafilter β retrieve a list of media.--puppetclassesfilter β retrieve a list of puppetclasses.--reportsfilter β retrieve a list of reports.--rolesfilter β retrieve a list of roles.--settingsfilter β retrieve a list of settings.--lookup_keysfilter β retrieve a list of lookup_keys.--dashboardfilter β retrieve a list of dashboard.--operatingsystemsfilter β retrieve a list of operatingsystems.--subnetsfilter β retrieve a list of subnets.--ptablesfilter β retrieve a list of ptables.--usersfilter β retrieve a list of users.--auth_source_ldapsβ retrieve a list of auth_source_ldaps.--hypervisorsβ retrieve a list of hypervisors.--lookup_valuesβ retrieve a list of lookup_values.--smart_proxiesβ retrieve a list of smart_proxies.--statisticsβ retrieve a list of statistics.--usergroupsβ retrieve a list of usergroups.--auditsβ Not implemented. π she is not built yet bestie, do not expect her.--bookmarksβ Not implemented. π same situation, also not built.-h,--helpβ show help message. always there for you. π
π§ ENVIRONMENT π§
Instead of specifying server credentials on the command line you can specify following environment variables:
FOREMAN_SERVERβ Foreman Server URLFOREMAN_USERβ Foreman userFOREMAN_PASSWORDβ Foreman password
The options specified on the command line take precedence over ENVIRONMENT VARIABLES. so if you set both, the command line one wins. every single time. no debate. π
π FILTERS π
Please see http://theforeman.org/projects/foreman/wiki/Search_API for more information. that's where the filter lore lives, go read it, it's worth it.
π Examples
foremancli --hosts "domain = domain.com AND class = squid"
foremancli --hosts "domain = domain.com AND facts.architecture = x86_64 AND class = module::class--classes name = squid"`
foremancli --domains "name = domain.com"
and that's the whole page, bestie. this was FOREMANCLI(1), from February 2019 β go forth and query your nodes, you're gonna slay. πβ¨ππ¦πΈπ
π«Ά
π¦ where this page comes from
- ubuntu jammy: foremancli 1.0-3 Β· GPL-2.0-or-later
- ubuntu noble: foremancli 1.0-3 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms