Ansible file not found error

We are generating the yaml file at run time but main.yml but it looks for a file when it starts running and says that file not found on the Ansible controller error.

How to avoid and tell to main.yml file to skip this error. Ansible playbook traces completely and checking all modules when they start running.

If we manually put a file and placed it in the current directory and it works file without having any issues.It is supposed to generate at run time and we cannot manually placed the file in the directory.

Please provide solutions if any.

We are generating the yaml file at run time but main.yml but it looks for a file when it starts running and says that file not found on the Ansible controller error.

How to avoid and tell to main.yml file to skip this error.

Use ingore_errors: yes for that specific task

Ansible playbook traces completely and checking all modules when they start running.

If we manually put a file and placed it in the current directory and it works file without having any issues.It is supposed to generate at run time and we cannot manually placed the file in the directory.

Please provide solutions if any.

Why not use a simple script which simply touches that file before the respective ansible task fetches for the file? Or insert another task in the playbook itself which touches the file?

Also its better to rectify the task giving that error. Even if the playbook is generated at runtime you might need to peep into that particular task and solve it once and for all.

Check if that file needs to be on the control node or the managed host.

We are generating the yaml file at run time but main.yml but it looks for a file when it starts running and says that file not found on the Ansible controller error.

How to avoid and tell to main.yml file to skip this error.

Use ingore_errors: yes for that specific task

Sorry for the typo its “ignore_errors”