# ignore\_errors doesn't work with copy?

**URL:** <https://forum.ansible.com/t/ignore-errors-doesnt-work-with-copy/12899>\
**Category:** Ansible Project\
**Created:** [June 3, 2013, 2:09pm UTC](https://forum.ansible.com/t/ignore-errors-doesnt-work-with-copy/12899 "2013-06-03T14:09:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bryan\_Larsen](https://avatars.discourse-cdn.com/v4/letter/b/9de053/32.png) [@Bryan\_Larsen](https://forum.ansible.com/u/Bryan_Larsen)\
**Post date:** [June 3, 2013, 2:09pm UTC](https://forum.ansible.com/t/ignore-errors-doesnt-work-with-copy/12899/1 "2013-06-03T14:09:37Z")

</div>

I wanted to do a copy IFF the src exists. I thought this would work:

- copy: src=…/…/…/…/shared/secrets.json dest=/srv/clara/shared/secrets.json backup=yes

ignore\_errors: yes

This fails with

fatal: [127.0.0.1] =\> input file not found at /home/rof/clara/shared/secrets.json or /shared/secrets.json

FATAL: all hosts have already failed – aborting

Is this a typo on my part, working as expected, or a bug?

thanks,  
Bryan

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Michael\_DeHaan](https://forum.ansible.com/u/Michael_DeHaan)\
**Post date:** [June 3, 2013, 3:20pm UTC](https://forum.ansible.com/t/ignore-errors-doesnt-work-with-copy/12899/2 "2013-06-03T15:20:41Z")

</div>

> 

Is this a typo on my part, working as expected, or a bug?

It’s a bug – though also working as expected – as I never expected anyone to try this 🙂

ignore\_errors was put there to ignore the return codes in modules returns, not in fatal errors that happen in processing the input, like missing local files. But I can’t see any reason why it shouldn’t work as you say.

Please file a ticket on github and we can make this work as you suggest. The template module should also be similarly modified.

---

<div class="post-metadata">

**Author:** ![Renaud\_Guerin](https://avatars.discourse-cdn.com/v4/letter/r/e9bcb4/32.png) [@Renaud\_Guerin](https://forum.ansible.com/u/Renaud_Guerin)\
**Post date:** [July 31, 2015, 11:43am UTC](https://forum.ansible.com/t/ignore-errors-doesnt-work-with-copy/12899/3 "2015-07-31T11:43:50Z")

</div>

Hi, has this ever been implemented ?

I’m hitting this same problem with the unarchive module, but anything that checks for local files really, should be affected.
