Fix first_found example (#86224)

This commit is contained in:
Matt Clay
2025-11-19 10:16:45 -08:00
committed by GitHub
parent 2797659df4
commit ce84d3157d
2 changed files with 3 additions and 1 deletions

View File

@@ -0,0 +1,2 @@
bugfixes:
- first_found - Correct the "Include tasks only if one of the files exists, otherwise skip" example.

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') }}"