Update example to work (#77191)

`with_first_found` only takes a list of things, it's not like `tags`
where it can take a thing or a list of things.

Inspired by locally discovered breakage and then finding
https://github.com/ansible/ansible/issues/77136 where someone was also
doing this and getting into trouble.
pull/77201/head
hfinucane 3 years ago committed by GitHub
parent e314f4e666
commit 86f00bd156
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -67,10 +67,10 @@ EXAMPLES = """
ansible.builtin.include_tasks:
file: "{{ item }}"
with_first_found:
files:
- path/tasks.yaml
- path/other_tasks.yaml
skip: True
- files:
- path/tasks.yaml
- path/other_tasks.yaml
skip: True
- name: Include tasks only if one of the files exists, otherwise skip
ansible.builtin.include_tasks: '{{ tasks_file }}'

Loading…
Cancel
Save