# copy module bug?

**URL:** <https://forum.ansible.com/t/copy-module-bug/21869>\
**Category:** Ansible Project\
**Created:** [June 27, 2016, 6:09pm UTC](https://forum.ansible.com/t/copy-module-bug/21869 "2016-06-27T18:09:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Oscar\_Hodgson](https://avatars.discourse-cdn.com/v4/letter/o/8dc957/32.png) [@Oscar\_Hodgson](https://forum.ansible.com/u/Oscar_Hodgson)\
**Post date:** [June 27, 2016, 6:09pm UTC](https://forum.ansible.com/t/copy-module-bug/21869/1 "2016-06-27T18:09:48Z")

</div>

Ansible 2.2.0

Copy module documentation says, “Options / force: the default is yes, which will replace the remote file when contents are different than the source. If no, the file will only be transferred if the destination does not exist.”

A sample playbook:

---

<div class="post-metadata">

**Author:** ![Kai\_Stian\_Olstad](https://avatars.discourse-cdn.com/v4/letter/k/e19adc/32.png) [@Kai\_Stian\_Olstad](https://forum.ansible.com/u/Kai_Stian_Olstad)\
**Post date:** [June 27, 2016, 8:05pm UTC](https://forum.ansible.com/t/copy-module-bug/21869/2 "2016-06-27T20:05:23Z")

</div>

If you run ansible-playbook with -v you'll see this message  
&nbsp;&nbsp;&nbsp;"dest": "/tmp",  
&nbsp;&nbsp;&nbsp;"msg": "file already exists",

So the destination /tmp do exist and the ntp.conf is not created.  
If you set the "dest: /tmp/" (trailing slash) and you run ansible-playbook with -v you get this  
&nbsp;&nbsp;&nbsp;"dest": "/tmp/ntp.conf"  
and it work as you expected.

If it's a feature or a bug I don't know, I guess it's a feature.

---

<div class="post-metadata">

**Author:** ![Oscar\_Hodgson](https://avatars.discourse-cdn.com/v4/letter/o/8dc957/32.png) [@Oscar\_Hodgson](https://forum.ansible.com/u/Oscar_Hodgson)\
**Post date:** [June 27, 2016, 10:39pm UTC](https://forum.ansible.com/t/copy-module-bug/21869/3 "2016-06-27T22:39:40Z")

</div>

Duh. So I was missing something. . Thanks.

Oscar
