mirror of
https://github.com/ansible/ansible.git
synced 2025-11-30 23:16:08 +07:00
Fix first_found example (#86224)
This commit is contained in:
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') }}"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user