mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-08 19:56:53 +00:00
An inventory group web-app-cst-<name> with applications.<id>.custom: true and
a pinned source {url, version, path} is pulled into roles/ before the play,
read raw (Jinja, Ansible tags and credential URLs refused), placed through a
staging directory under an exclusive lock, and owned by a marker that names
its own directory, so a pull or roles-clean never replaces or removes a
directory it did not place and a failed pull leaves roles/ as it was.
Directory inventories, host lists and non-UTF-8 files behave as Ansible
reads them; generated test deploys pass --skip-pull. make roles-pull,
roles-clean and roles list, INFINITO_EXTRA_MOUNTS for local sources, the
web-app-cst category, the reserved prefix lint and a central
repository_files() that also yields the gitignored custom roles let every
lint scan them like in-tree roles. Supersedes the uncommitted 045 External
Roles draft and reuses its fetch, sync and mount design.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
23 lines
677 B
Bash
Executable File
23 lines
677 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
: "${node:?node= must be set, e.g. node=swarm-mgr-01}"
|
|
|
|
if ! docker inspect --format '{{.State.Running}}' "${node}" 2>/dev/null | grep -q '^true$'; then
|
|
echo "ERROR: container '${node}' is not running. Run \`make swarm-zombie app=<id>\` first." >&2
|
|
exit 1
|
|
fi
|
|
|
|
repo_root="$(cd "$(dirname "$0")/../../../.." && pwd)"
|
|
cd "${repo_root}"
|
|
|
|
# shellcheck source=scripts/meta/env/load.sh
|
|
source "${repo_root}/scripts/meta/env/load.sh"
|
|
|
|
{
|
|
git ls-files -z -m -o --exclude-standard
|
|
git ls-files -z -o -i --exclude-standard -- 'roles/web-app-cst-*'
|
|
} |
|
|
tar --null -cf - -T - |
|
|
docker exec -i "${node}" tar -C "${INFINITO_NODE_SRC_DIR:?}" -xpf -
|