[stable-2.19] Fix first_found example (#86224) (#86226)

(cherry picked from commit ce84d31)

Co-authored-by: Matt Clay <matt@mystile.com>
This commit is contained in:
Abhijeet Kasurde
2025-11-24 09:18:35 -06:00
committed by GitHub
co-authored by Matt Clay
parent 9963ec18e8
commit b4c6af0ac1
2 changed files with 3 additions and 1 deletions
@@ -0,0 +1,2 @@
bugfixes:
- first_found - Correct the "Include tasks only if one of the files exists, otherwise skip" example.
+1 -1
View File
@@ -79,7 +79,7 @@ EXAMPLES = """
- name: Include tasks only if one of the files exists, otherwise skip
ansible.builtin.include_tasks: '{{ tasks_file }}'
when: tasks_file != ""
when: tasks_file is not none
vars:
tasks_file: "{{ lookup('ansible.builtin.first_found', files=['tasks.yaml', 'other_tasks.yaml'], errors='ignore') }}"