feat: add host actions, lifecycle hooks and operational tools
This commit is contained in:
1 parent
8d4915543e
commit
e5bde9c61f
32 files changed
+2083
-64
No files matched your search
@@ -64,6 +64,13 @@ func editCommands(cfg *config.Config) error {
|
||||
huh.NewInput().Title("Alias prefix").Description("m + host shortcut xg1 = mxg1. Empty disables automatic aliases.").Value(&command.AliasPrefix),
|
||||
huh.NewInput().Title("Program or executable script").Description("Use an absolute script path, or bash/python3 with the script path as the first argument.").Placeholder("mtr or /home/user/bin/check-host").Value(&binary),
|
||||
huh.NewText().Title("Arguments, one per line").Description("Use {address} for the resolved address, {host} for the hostname, {target} for instance/hostname. No shell quoting needed.").Lines(5).Value(&arguments),
|
||||
huh.NewConfirm().Title("Confirm before running?").Value(&command.Confirm),
|
||||
huh.NewInput().Title("Timeout").Description("Optional positive duration, e.g. 30s or 5m.").Value(&command.Timeout),
|
||||
huh.NewInput().Title("Post-run script").Description("Local command after completion; receives NETSSH_EXIT_CODE.").Value(&command.PostRun),
|
||||
huh.NewInput().Title("Only for tag").Value(&command.Match.Tag),
|
||||
huh.NewInput().Title("Only for instance").Value(&command.Match.Instance),
|
||||
huh.NewInput().Title("Only for kind").Description("device, vm or static; empty means all.").Value(&command.Match.Kind),
|
||||
huh.NewInput().Title("Only for hostname pattern").Description("For example router*; all specified filters must match.").Value(&command.Match.Name),
|
||||
).Title("Local command")).Run()
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Reference in new issue
Block a user