# How to ignore files that can not be found as part of vars\_files

**URL:** <https://forum.ansible.com/t/how-to-ignore-files-that-can-not-be-found-as-part-of-vars-files/35116>\
**Category:** Ansible Project\
**Created:** [May 5, 2021, 11:20am UTC](https://forum.ansible.com/t/how-to-ignore-files-that-can-not-be-found-as-part-of-vars-files/35116 "2021-05-05T11:20:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dudu.c](https://avatars.discourse-cdn.com/v4/letter/d/278dde/32.png) [@dudu.c](https://forum.ansible.com/u/dudu.c)\
**Post date:** [May 5, 2021, 11:20am UTC](https://forum.ansible.com/t/how-to-ignore-files-that-can-not-be-found-as-part-of-vars-files/35116/1 "2021-05-05T11:20:41Z")

</div>

Hi,

I need to upload 5 files as part of vars\_files.

There is a chance that one of the files is missing and in this case i want to ignore it - How can i do that.

This is my solution for a single file , but how can i used it for 5 files

vars:

- optional\_1\_vars\_file: “{{ lookup(‘first\_found’, ‘1.yml’, errors=‘ignore’) }}”  
tasks:
- when: optional\_1\_vars\_file is file  
include\_vars: “{{ optional\_1\_vars\_file }}”
