Fix first_found example (#86224)

pull/85068/head
Matt Clay 2 weeks ago committed by GitHub
parent 2797659df4
commit ce84d3157d
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 - name: Include tasks only if one of the files exists, otherwise skip
ansible.builtin.include_tasks: '{{ tasks_file }}' ansible.builtin.include_tasks: '{{ tasks_file }}'
when: tasks_file != "" when: tasks_file is not none
vars: vars:
tasks_file: "{{ lookup('ansible.builtin.first_found', files=['tasks.yaml', 'other_tasks.yaml'], errors='ignore') }}" tasks_file: "{{ lookup('ansible.builtin.first_found', files=['tasks.yaml', 'other_tasks.yaml'], errors='ignore') }}"

Loading…
Cancel
Save