From 230c231e7bb2c27be7bb9f63c74c7f86b3462897 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Sun, 18 Oct 2026 02:28:19 +0200 Subject: [PATCH] fix(web-app-mediawiki): write the task includes in the form the lints can read Both includes went through `{{ [role_path, 'tasks', ''] | path_join }}`, which Ansible resolves correctly and the gate lint cannot see at all. `_include_target_paths` in tests/lint/ansible/shell/container/test_exec_is_stack_host_gated.py accepts two shapes: a literal basename, and `{{ role_path }}/tasks/...`, which it strips with a regex. A Jinja expression that is neither, and carries no `loop`, falls through both branches, so the include edge never exists for the lint. Without that edge 02_extensions.yml does not inherit the `when: IS_STACK_HOST | bool` its caller carries, and its two `container exec` tasks read as ungated - which in swarm would mean the helper exiting 64 on a worker. The literal form satisfies both lints. The include-existence test, which is what the path_join form was written for, resolves `{{ role_path }}` by substitution and is equally happy with it. make test-lint: 664 passed, 0 failed. Co-Authored-By: Claude Opus 5 (1M context) --- roles/web-app-mediawiki/tasks/utils/stack_host.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/web-app-mediawiki/tasks/utils/stack_host.yml b/roles/web-app-mediawiki/tasks/utils/stack_host.yml index e1436a6af6..66f6922843 100644 --- a/roles/web-app-mediawiki/tasks/utils/stack_host.yml +++ b/roles/web-app-mediawiki/tasks/utils/stack_host.yml @@ -9,13 +9,13 @@ - name: "📂 Load extensions procedures for '{{ application_id }}'" include_tasks: - file: "{{ [role_path, 'tasks', '02_extensions.yml'] | path_join }}" + file: "{{ role_path }}/tasks/02_extensions.yml" apply: delegate_to: "{{ MEDIAWIKI_HOST_NODE }}" when: MEDIAWIKI_EXT_ENABLED | length > 0 - name: "📂 Load update procedures for '{{ application_id }}'" - include_tasks: "{{ [role_path, 'tasks', '03_install.yml'] | path_join }}" + include_tasks: "{{ role_path }}/tasks/03_install.yml" when: >- (_role_templates_render.changed | default(false)) or (_install_results.changed | default(false)) or