List host build status using hammer cli


Web UI doesn’t appear to list build status of hosts in a nice list. I have to look at each individually. I need to list with hammer, but can’t figure out the correct syntax.

Expected outcome:

hammer host list with correct option of build_status will output a nice list of hosts with the build status or built or pending.

Foreman and Proxy versions:

Foreman and Proxy plugin versions:
Distribution and version:
Redhat 8.8
Other relevant data:

I can see running “hammer host list --help” that build_status is in the list, but I haven’t the foggiest clue how to actually get that returned as there are zero examples of how to do that in a command line. I’ve tried a few things, but gave up. There doesn’t seem to be much help online how to access these many options.

Here’s a portion of the output from “hammer host list --help”

Option details:
Here you can find option types and the value an option can accept:

BOOLEAN One of true/false, yes/no, 1/0
DATETIME Date and time in YYYY-MM-DD HH:MM:SS or ISO 8601 format
ENUM Possible values are described in the option’s description
FILE Path to a file
KEY_VALUE_LIST Comma-separated list of key=value.
JSON is acceptable and preferred way for such parameters
LIST Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
JSON is acceptable and preferred way for such parameters
MULTIENUM Any combination of possible values described in the option’s description
NUMBER Numeric value. Integer
SCHEMA Comma separated list of values defined by a schema.
JSON is acceptable and preferred way for such parameters
VALUE Value described in the option’s description. Mostly simple string

Search / Order fields:

build_status Values: built, pending, token_expired, build_failed

And there’s build status above.


Maybe the report template “Hosts - Statuses” would help here? It can list all your host statuses in a nice readable format of your choice.

Thanks. I’ll give that a try.