resolve compose template via ansible search path instead of absolute app_templates_path

This commit is contained in:
2026-07-16 22:55:00 -04:00
parent eece28d2b1
commit ef6a57bb7c
3 changed files with 5 additions and 21 deletions
+4 -5
View File
@@ -30,11 +30,10 @@ app_health_check_retries: 30
app_health_check_delay: 10
app_health_check_status_codes: [200, 201, 202]
# Templates path derives from the caller (shim) role's directory, so shim
# roles in any collection layout Just Work. ansible_parent_role_paths[0] is
# the absolute path of the role that pulled this one in as a dep.
app_templates_path: "{{ ansible_parent_role_paths[0] }}/templates"
app_compose_template: "{{ app_templates_path }}/compose.yml.j2"
# Relative src — Ansible's template resolver searches loaded roles' templates/
# directories, so this finds the calling (shim) role's compose.yml.j2 without
# any absolute-path plumbing.
app_compose_template: compose.yml.j2
app_subdirectories: []
# - config