Skip to content
lemano target end-trial

lemano target end-trial

Undo or keep a revert’s trial that nothing finished on a target

Description

Finish a trial of lemano revert that a pass found on the host with nothing
left to finish it: its folder is still in /var/lib/lemano/trial, its
timer is gone (a reboot during the window) and the undo the host runs at
boot did not remove it, or the host has no systemd. The target then has
the condition UnfinishedTrial.

--undo runs the trial's own undo script: the files it saved are put back,
checked (sshd -t, visudo -c) before any reload, and the folder is removed.
--keep keeps the files as they are now and removes the folder. Either way
a pass follows, which clears the condition, and the trial's outcome is
recorded when it is in the target's history.

With several unfinished trials, name one with --trial (its ID is in the
condition). Targets are read from the target files, as revert reads them.

Synopsis

lemano target end-trial NAME --undo | --keep [--trial ID]

Examples

lemano target end-trial web-07 --undo
lemano target end-trial web-07 --keep -f targets/

Flags

FlagTypeDefaultDescription
-f, --filenamestringtarget file or directory of target files (default the current directory)
--keepkeep the files as they are and remove the trial’s folder
--trialstringthe trial’s ID, when the target has several
--undoput back the files the trial saved

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