mirror of
https://github.com/ansible/ansible.git
synced 2026-02-03 20:40:24 -05:00
Fix first_found example (#86224)
This commit is contained in:
parent
2797659df4
commit
ce84d3157d
2 changed files with 3 additions and 1 deletions
2
changelogs/fragments/first-found-example.yml
Normal file
2
changelogs/fragments/first-found-example.yml
Normal file
|
|
@ -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…
Reference in a new issue