mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-20 17:40:11 +00:00
fix(web-app-mediawiki): write the task includes in the form the lints can read
Both includes went through `{{ [role_path, 'tasks', '<file>'] | 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) <noreply@anthropic.com>
This commit is contained in:
1 parent
eda7afdffc
commit
230c231e7b
1 file changed
+2
-2
@@ -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
|
||||
|
||||
Reference in new issue
Block a user