Scroll to navigation

FOREMANCLI(1) FOREMANCLI(1)

NAME

foremancli - comandline search interface to Foreman

SYNOPSIS

foremancli options

DESCRIPTION

Query Foreman server for stored node information.

OPTIONS

Output more information
Foreman user. Instead of providing the user via the command-line you can also set the FOREMAN_USER environment variable. The user specified via the command-line takes precedence over the environment variable.
Foreman password. Instead of providing the password via the command-line you can also set the FOREMAN_PASSWORD environment variable. The password specified via the command-line takes precedence over the environment variable.
Foreman Server URL. Instead of providing the URL via the command-line you can also set FOREMAN_SERVER environment variable. The url specified via the command-line takes precedence over the environment variable.
JSON output
YAML output
Foreman status
Custom COLLECTION string, see: http://theforeman.org/projects/foreman/wiki/API for more information
Retrieve a list of architectures
Retrieve a list of common_parameters
Retrieve a list of config_templates
Retrieve a list of domains
Retrieve a list of environments
Retrieve a list of fact_values
Retrieve a list of hosts
Retrieve a list of hostgroups
Retrieve a list of media
Retrieve a list of puppetclasses
Retrieve a list of reports
Retrieve a list of roles
Retrieve a list of settings
Retrieve a list of lookup_keys
Retrieve a list of dashboard
Retrieve a list of operatingsystems
Retrieve a list of subnets
Retrieve a list of ptables
Retrieve a list of users
Retrieve a list of auth_source_ldaps
Retrieve a list of hypervisors
Retrieve a list of lookup_values
Retrieve a list of smart_proxies
Retrieve a list of statistics
Retrieve a list of usergroups
Not implemented
Not implemented
Show help message

ENVIRONMENT

Instead of specifying server credentials on the command-line you can specify following environment variables:

Foreman Server URL
Foreman user
Foreman password

The options specified on the command-line take precedence over ENVIRONMENT VARIABLES.

FILTERS

Please see http://theforeman.org/projects/foreman/wiki/Search_API for more information

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"

February 2019