[stable-2.20] Fix first_found example (#86224) (#86225)

(cherry picked from commit ce84d31)

Co-authored-by: Matt Clay <matt@mystile.com>
pull/86256/head
Abhijeet Kasurde 1 week ago committed by GitHub
parent 0feb43a333
commit cc7b984418
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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

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

Loading…
Cancel
Save