# How to make an error non fatal in dry mode?

**URL:** <https://forum.ansible.com/t/how-to-make-an-error-non-fatal-in-dry-mode/23594>\
**Category:** Ansible Project\
**Created:** [January 30, 2017, 11:19am UTC](https://forum.ansible.com/t/how-to-make-an-error-non-fatal-in-dry-mode/23594 "2017-01-30T11:19:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cev\_Ing](https://avatars.discourse-cdn.com/v4/letter/c/f05b48/32.png) [@Cev\_Ing](https://forum.ansible.com/u/Cev_Ing)\
**Post date:** [January 30, 2017, 11:19am UTC](https://forum.ansible.com/t/how-to-make-an-error-non-fatal-in-dry-mode/23594/1 "2017-01-30T11:19:49Z")

</div>

I have a playbook with the following two tasks:

- copy:  
src: libpasswdqc.so.0  
dest: /usr/lib/libpasswdqc.so.0  
owner: root  
group: bin  
mode: 0755

- file:  
src: ./libpasswdqc.so.0  
dest: /usr/lib/libpasswdqc.so  
owner: root  
group: root  
state: link

It is not possible to check this playbook, because the first task does not copy the file while running in dry mode and the second throws a fatal error:

fatal: [xxxxxxxx]: FAILED! =\> {“changed”: false, “failed”: true, “msg”: “src file does not exist, use "force=yes" if you really want to create the link: /usr/lib/./libpasswdqc.so.0”, “path”: “/usr/lib/libpasswdqc.so”, “src”: “./libpasswdqc.so.0”, “state”: “absent”}

How to make the error non fatal during dry runs?

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [January 30, 2017, 6:27pm UTC](https://forum.ansible.com/t/how-to-make-an-error-non-fatal-in-dry-mode/23594/2 "2017-01-30T18:27:14Z")

</div>

you can add:

ignore\_errors: “{{ansible\_check\_mode|bool}}”

or

register: myresult  
failed\_when: myresult|failed and not ansible\_check\_mode
