host_copy
Copy files or directories from one host to many over SSH, with dry-run size/SHA-256 plans, target backups, and optional KEY=value edits for one env file.
Instructions
Copy files or directories from one host to others through this machine (certificates, /opt/remnanode/docker-compose.yml with the node key, /etc/log-upload/secrets.env, haproxy.cfg …): what the owner did by hand when moving an ingress or cloning a node. Contents are never shown: the plan lists size and sha256 on the source and on each target. Existing target paths are archived to /root/mia-backup-.tgz first. For one env-style file, set changes KEY=value lines on the way (e.g. LOG_NODE_NAME).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| set | No | only with one file: KEY=value lines to set | |
| from | Yes | source host (inventory) | |
| mode | No | chmod for copied files, e.g. 600 | |
| apply | No | false (default) = dry run: show what will happen on which hosts and a planHash. true = run it; needs planHash | |
| batch | No | hosts at a time (rolling). Default depends on the action: 1 for disruptive ones | |
| paths | Yes | ||
| target | Yes | destination hosts: hosts: all | <host> | <glob nl-*> | <group> | role:<edge|remnanode|panel|docker> | tag:<tag>; comma-separated, !x excludes | |
| planHash | No | planHash from the dry run of the very same call, good for one apply; refused if targets or their state changed since | |
| continueOnError | No | keep going after a host fails (default: stop the rollout at the first failure) | |
| skipUnreachable | No | skip hosts that do not answer over ssh instead of refusing the whole plan (they show as skipped) |