# copy module failure detection issue

**URL:** <https://forum.ansible.com/t/copy-module-failure-detection-issue/28227>\
**Category:** Ansible Project\
**Created:** [August 1, 2018, 3:44pm UTC](https://forum.ansible.com/t/copy-module-failure-detection-issue/28227 "2018-08-01T15:44:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Narahari\_n\_Savitha](https://avatars.discourse-cdn.com/v4/letter/n/8e8cbc/32.png) [@Narahari\_n\_Savitha](https://forum.ansible.com/u/Narahari_n_Savitha)\
**Post date:** [August 1, 2018, 3:44pm UTC](https://forum.ansible.com/t/copy-module-failure-detection-issue/28227/1 "2018-08-01T15:44:19Z")

</div>

Friends:

Thank you for your time and attention in advance.

I use the anisble copy module to copy to a machine in ADHOC mode.

The copy command looks like this

ansible TOMCATS\_GROUP\_ALL -i “func\_testing\_machine”, -m copy -a “src=/home/the\_ansible\_user/certs/ftm/ dest=/opt/zebra/tomcat\_mods/conf mode=640 owner=tcuser group=tcgrp force=yes follow=yes” -u ansi\_user

The ansi\_user does not have admin rights.

However when the above command runs I get the output like this

func\_testing\_machine | SUCCESS =\> {  
“changed”: false,  
“dest”: “/opt/zebra/tomcat\_mods/conf”,  
“failed”: false,  
“src”: “/home/the\_ansible\_user/certs/ftm/”  
}

But I DO NOT get an error back.

The ansi\_user should not be able to copy to the destination since the ansi\_user is NOT the owner of the folder or the files.

However I dont see any errors saying

could not copy  
permission denied

or when I do  
echo $?  
0

So what should I rely on for a successful copy ?

Any thoughts ?

-Narahari

PS: Is there an ansible bug reporting process please .

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [August 1, 2018, 10:16pm UTC](https://forum.ansible.com/t/copy-module-failure-detection-issue/28227/2 "2018-08-01T22:16:32Z")

</div>

As i responded in the ticket:

This is not a bug, changed: False shows that no change was needed, so  
the 'copy' was considered successful (the files already existed as  
required on the target).

Ansible will only try to copy the file if it detects it needs to or  
you use force: yes, otherwise it just verifies the files are what is  
expected.

This is true for most actions in Ansible, they enforce 'state' instead  
of always performing an action.
