cibles TENANT= : la cle SSH suit le locataire vise

INVENTAIRE_VISE changeait l'inventaire, pas la cle : calculee a l'ouverture
du Makefile sur l'instance montee, elle restait celle de Chezlepro, et sshd
coupait chaque machine de TechnoLibre (Too many authentication failures)
avant la premiere tache de deposer-maintenant. CHANGELOG 234.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Daniel Allaire 2026-11-02 13:10:48 -05:00
commit a6a3f3c241
2 changed files with 12 additions and 0 deletions

View file

@ -1304,8 +1304,14 @@ define INVENTAIRE_VISE
if [[ -n "$$dossier" ]]; then \
inv="$$dossier/inventories/principal/hosts.yml"; env_inst=(SETOPS_INSTANCE="$$dossier"); \
[[ -f "$$inv" ]] || { printf 'REFUS : %s introuvable\n' "$$inv"; exit 2; }; \
cle="$$(SETOPS_INSTANCE="$$dossier" python3 scripts/cle_ssh.py 2>/dev/null)"; \
[[ -n "$$cle" ]] && env_inst+=(ANSIBLE_PRIVATE_KEY_FILE="$$cle"); \
fi;
endef
# LA CLE SUIT LE LOCATAIRE VISE (2026-11-02). `ANSIBLE_PRIVATE_KEY_FILE` se calcule a l'ouverture du
# Makefile, sur l'instance MONTEE : `TENANT=OPS-Technolibre`, instance montee sur Chezlepro, presentait
# la cle de Chezlepro puis celles de l'agent, et `sshd` coupait chaque machine (« Too many
# authentication failures ») avant la premiere tache de `deposer-maintenant`.
define VAULT_UNE_FOIS
vault_chiffre="$$(grep -rlsIF '$$ANSIBLE_VAULT' $(dir $(INVENTAIRE_PRODUCTION))group_vars 2>/dev/null | head -1 || true)"; \