Replies: 1 comment 1 reply
|
Thanks for the detailed report—the diagnosis and proposed configuration shape were right. I opened #12182 to implement it. The PR adds:
The resulting precedence is AI-assisted — Tool: Codex; model: unavailable/unavailable; version: unavailable. |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Summary
mise bootstrap remoterunsmise bootstrapinside the staged project on the target, but no config environment reaches that process, somise.<env>.tomlfiles cannot take part in a remote bootstrap.I would like a way to declare, per inventory host, which config environments the remote run should load.
Current behaviour
mise 2026.8.8.
src/system/remote.rs,run_staged:followed by conditional pushes for
--dry-run,--yes,--update,--prompt-secrets,--force-dotfiles,--skipand--only.The resulting remote command, captured by putting a logging
sshonPATH:Running the orchestrator as
mise -E linux bootstrap remote <host>produces exactly the same remote command.Neither
RemoteRunOptionsnorRemoteHostTomlConfigcarries an environment field, so this reads as a gap rather than a decision.Setting
[env] MISE_ENV = "..."in the stagedmise.tomldoes not help either, since environment selection happens during config discovery, before[env]is evaluated.Why platform detection does not cover this
mise bootstrapalready gates by OS, and that part works well.On macOS a config carrying
[bootstrap.users]logsignoring [bootstrap.users] and [bootstrap.groups] on non-Linux hostand applies the[bootstrap.macos.*]sections instead.Two things platform gating cannot express:
[dotfiles]is not platform gated, and a workstation and a server usually want different sets.servervsworkstationvsciis precisely what config environments are for, and it is the axis a fleet tends to be organised along.Use case
A dotfiles repo with
mise.macos.toml,mise.linux.toml,mise.server.tomlandmise.dotfiles.toml.Locally I run
mise -E macos,dotfiles bootstrap.For a server I would like the remote to run with
server,linux,dotfiles, chosen by me, per host, in versioned config.Proposal
A per-host inventory key, emitted into the
envprefix that already exists:producing:
Per-host rather than inherited from the orchestrator, because the local environment is rarely meaningful on the target: a laptop running
-E macosshould not pushmacosto a Linux box.A
[bootstrap.remote].mise_envdefault and a--remote-envCLI override would compose the same way the existingsourceandexcludekeys already do.Workarounds today
Relative
remote_miseresolves inside the staged project, so a committed shim works:This works but bypasses
bootstrap_command, becauseprovision_misereturns early whenremote_miseis set, so the shim has to install mise itself.ssh_options = ["SendEnv=MISE_ENV"]is also passed through correctly, but it needsAcceptEnv MISE_ENVin the target's sshd_config, which is circular when the point is to bootstrap that host in the first place.Note on the docs
The remote page states that local environment variables are deliberately not copied to SSH hosts.
I read that as being about secret transport, since it sits in the
--prompt-secretsparagraph.If it is also meant to rule out config environment selection, that would be worth saying explicitly, because the two seem like different concerns.
Happy to open a PR if the per-host key is the shape you would want.
All reactions