erplibre/script/todo
Mathieu Benoit b8bfb0f8e0 [ADD] qemu: an SSH configuration tool, with recursive ProxyJump
~/.ssh/config entries were only ever written while deploying a VM. A fleet
that already exists — or one whose DHCP leases have moved — had no way to
refresh them. Entry [13] of the QEMU menu does it on demand:

  [1] update ~/.ssh/config for the local VMs
  [2] add the nested VMs through ProxyJump, recursively

The second one matters because of the « ERPLibre Deployment (+ QEMU + dev) »
profile: a VM built that way hosts VMs of its own, on its own private network.
Those are not reachable from this host at all — only from their parent. So
each level is written with a ProxyJump to the level above, and OpenSSH chains
the hops on its own. « ssh erplibre-fedora-42 » then works from here even
though the address only means something two machines away.

The recursion probes over « ssh <alias> », i.e. through the block just
written, so the parent's own ProxyJump applies automatically and one probe
works identically at any depth. One SSH connection per MACHINE, not per VM: a
single snippet returns every « name<TAB>ip » pair, falling back to the guest
agent when the dnsmasq lease is missing. Passwordless sudo is a given here —
the cloud-init config grants it (deploy_qemu.py:1175).

A nested VM keeps its short name, which is what one wants to type, and is only
prefixed with its parent on collision — so discovering a machine that already
exists elsewhere never overwrites the other one's entry. Depth defaults to 2
(host, VM, nested VM) and already-seen aliases are skipped, which is what
stops a cycle: a child that reports its own grandparent.

Verified on a simulated two-level fleet including a deliberate cycle: the
ProxyJump chain is correct at each level, the colliding name is prefixed, the
parent block is not overwritten, and only one probe per machine is issued. The
remote snippet itself was run for real on this host — valid POSIX sh, two VMs
with their addresses. A VM without an IP is skipped rather than written with
an empty HostName.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-08-01 07:24:15 -04:00
..
database_manager.py [IMP] todo: add erase-database menu command 2026-06-25 02:37:22 -04:00
kdbx_manager.py [IMP] script: update copyright year to 2026 2026-03-11 23:16:05 -04:00
logo_ascii.txt [IMP] bot assistant TODO 2025-04-27 02:40:20 -04:00
migration_form.py [ADD] migration: a TUI resume screen, same first question as the prompt 2026-08-01 06:38:31 -04:00
qemu_deploy_form.py [FIX] qemu form: tick nothing in the catalog by default 2026-08-01 06:27:25 -04:00
qemu_install_monitor.py [ADD] qemu: statistics screen, with reset — and record failures too 2026-08-01 05:16:27 -04:00
README.base.md [ADD] Multilingual translation of all documentation (EN/FR) 2026-03-04 22:23:52 -05:00
README.fr.md [ADD] Multilingual translation of all documentation (EN/FR) 2026-03-04 22:23:52 -05:00
README.md [ADD] Multilingual translation of all documentation (EN/FR) 2026-03-04 22:23:52 -05:00
source_todo.sh [UPD] TODO: auto installation 2025-10-31 01:33:34 -04:00
todo.json [IMP] script todo: add QEMU/KVM VM deploy menu 2026-07-15 11:48:12 +00:00
todo.py [ADD] qemu: an SSH configuration tool, with recursive ProxyJump 2026-08-01 07:24:15 -04:00
todo_example.json [UPD] TODO: simplify code by reusing method and support same command 2025-04-28 00:35:27 -04:00
todo_file_browser.py [IMP] script: update copyright year to 2026 2026-03-11 23:16:05 -04:00
todo_i18n.py [ADD] qemu: an SSH configuration tool, with recursive ProxyJump 2026-08-01 07:24:15 -04:00
todo_prefs.py [ADD] migration: a TUI resume screen, same first question as the prompt 2026-08-01 06:38:31 -04:00
todo_telemetry.py [FIX] télémétrie navigation : extraire les commandes des menus « choices » 2026-07-30 23:24:40 -04:00
todo_upgrade.py [FIX] migration: tell modules with no code from those to uninstall 2026-08-01 07:16:26 -04:00
version_manager.py [IMP] script: update copyright year to 2026 2026-03-11 23:16:05 -04:00

TODO is an assistant robot to use ERPLibre Execute it with ./script/todo/todo.py or make todo.

For a new project, copy todo_example.json to private/todo/todo_override.json | private/todo/todo_override_private.json and edit it.