Skip to content

lemano state list

List the objects a generation of a target holds

Description

"state list NAME" lists the objects a target's generation holds (the
latest, or the one --generation names) with the conditions and notes their
kinds declare. They are computed when shown from what was recorded, never
stored. With -o, each object carries its stored status.

The list holds what defines the server: for example the kernel parameters
a file sets or that were changed, the packages installed by hand, the
files no package owns or that differ from their package, the services
that are enabled, running or defined under /etc, and the ordinary
accounts. The objects that do not are counted, kind by kind with the
rule, below the table (in the summary of -o). An object that differs from
the baseline or has a condition is always listed. --all lists every
object with every field.

"state list -A" lists the objects of the latest generation of every
target, or of those -l selects, with a TARGET column; with -o, each object
names its target. It takes no name and no --generation. Targets that have
no generation yet are left out.

Synopsis

lemano state list [NAME | -A [-l SELECTOR]] [-o json|yaml]

Examples

lemano state list web-07 --flagged
lemano state list web-07 --kind Sysctl --generation 3
lemano state list web-07 --all
lemano state list -A --flagged
lemano state list -A -l env=prod --kind Package -o json

Flags

FlagTypeDefaultDescription
--alllist every object, not only those that define the server, with every field of -o
-A, --all-targetslist the objects of every target’s latest generation (with -l, of the targets it selects)
--flaggedkeep only the objects that have a condition or a note
-g, --generationint64-1the generation to show (default: the latest)
-k, --kindstringkeep only the objects of this kind
-o, --outputstringoutput format: json or yaml (default: a table for people)
-l, --selectorstringlabel selector with -A: key=value pairs separated by commas, all of which must match

Flags inherited from parent commands

FlagTypeDefaultDescription
--log-levelstringwarnlog level on standard error: debug, info, warn or error
--no-colornever colour the text (colour is also off when $NO_COLOR is set, when $TERM is dumb and when the output is not a terminal; $FORCE_COLOR turns it on, over $NO_COLOR)
--password-promptask on the terminal for the login password of each target whose file names none
--ssh-configstringssh configuration file that targets’ connection settings are read from, or none to read none (default $LEMANO_SSH_CONFIG, else the files ssh reads)
--storestringpath of the store (default $LEMANO_STORE, else $XDG_DATA_HOME/lemano/lemano.db)
--sudo-password-promptask on the terminal for the sudo password of each target whose file names none

Exit codes

See exit codes.

See also