derive app_templates_path from ansible_parent_role_paths

This commit is contained in:
2026-07-16 22:29:59 -04:00
parent f045c43f8e
commit eece28d2b1
2 changed files with 6 additions and 3 deletions
+4 -1
View File
@@ -30,7 +30,10 @@ app_health_check_retries: 30
app_health_check_delay: 10
app_health_check_status_codes: [200, 201, 202]
app_templates_path: "{{ app_roles_path + '/' + app_role_name }}/templates"
# 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"
app_subdirectories: []