Skip to content

Conversation

@targos
Copy link
Member

@targos targos commented Jul 25, 2025

Refs: #4109

@targos
Copy link
Member Author

targos commented Jul 25, 2025

I'm hitting an error with Ansible:

Details
TASK [package-upgrade : include package manager tasks] ***********************************************************************************************
[ERROR]: Task failed: Finalization of task args for 'ansible.builtin.include_tasks' failed: Error while resolving value for '_raw_params': The filter plugin 'match_key' failed: startswith first arg must be str or a tuple of str, not _AnsibleLazyTemplateList

Task failed.
Origin: /Users/mzasso/git/nodejs/build/ansible/roles/package-upgrade/tasks/main.yml:7:5

5 #
6
7   - name: include package manager tasks
      ^ column 5

<<< caused by >>>

Finalization of task args for 'ansible.builtin.include_tasks' failed.
Origin: /Users/mzasso/git/nodejs/build/ansible/roles/package-upgrade/tasks/main.yml:9:5

7   - name: include package manager tasks
8     when: not os|startswith("zos")
9     include_tasks: "partials/{{ template }}.yml"
      ^ column 5

<<< caused by >>>

Error while resolving value for '_raw_params': The filter plugin 'match_key' failed: startswith first arg must be str or a tuple of str, not _AnsibleLazyTemplateList
Origin: /Users/mzasso/git/nodejs/build/ansible/roles/package-upgrade/tasks/main.yml:9:20

7   - name: include package manager tasks
8     when: not os|startswith("zos")
9     include_tasks: "partials/{{ template }}.yml"
                     ^ column 20

fatal: [test-digitalocean-fedora42-x64-1]: FAILED! => {"changed": false, "msg": "Task failed: Finalization of task args for 'ansible.builtin.include_tasks' failed: Error while resolving value for '_raw_params': The filter plugin 'match_key' failed: startswith first arg must be str or a tuple of str, not _AnsibleLazyTemplateList"}

Edit: I found the problem. I had ansible-core-2.19.0, but latest ansible is not compatible with it.
I ran pip install --upgrade ansible which downgraded to ansible-core-2.18.7.

@targos
Copy link
Member Author

targos commented Jul 25, 2025

@targos targos marked this pull request as ready for review July 25, 2025 18:41
@targos targos merged commit 89b801c into main Jul 26, 2025
2 checks passed
@targos targos deleted the fedora-42 branch July 26, 2025 05:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants