Skip to content

fix(ansible): write resolved compose to separate file

Jérôme Revillard requested to merge fix/d2-resolved-compose into main

Problem

The deploy.yml resolved compose task wrote output back to docker-compose.yaml, destroying the source template. On tagged re-runs (--tags build,deploy), frozen values from a previous run were baked in and vault secret changes silently ignored. This single bug caused 5 of the 29 deployment errors tracked in #826 (closed).

Additionally, a typo on the host_ip sed command referenced docker-compose.resolved.yaml.tmp instead of docker-compose.yaml.tmp, so host_ip properties were never stripped.

Fix

  • Write resolved output to docker-compose.resolved.yaml (separate file)
  • Fix host_ip sed typo
  • Update stack deploy and permissions tasks to use resolved file
  • Source template docker-compose.yaml remains untouched

Testing

  • Existing --tags deploy runs: resolved file generated, source untouched
  • Tagged re-runs (--tags build,deploy): secrets from vault correctly substituted
  • Vault secret change + re-deploy: new secrets propagated (previously silently ignored)

Closes #826 (closed) D2

Merge request reports

Loading