# Bug in copy module (ansible 1.3.2)

**URL:** <https://forum.ansible.com/t/bug-in-copy-module-ansible-1-3-2/13753>\
**Category:** Ansible Project\
**Created:** [October 23, 2013, 4:15pm UTC](https://forum.ansible.com/t/bug-in-copy-module-ansible-1-3-2/13753 "2013-10-23T16:15:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anand\_Buddhdev2](https://avatars.discourse-cdn.com/v4/letter/a/48db29/32.png) [@Anand\_Buddhdev2](https://forum.ansible.com/u/Anand_Buddhdev2)\
**Post date:** [October 23, 2013, 4:15pm UTC](https://forum.ansible.com/t/bug-in-copy-module-ansible-1-3-2/13753/1 "2013-10-23T16:15:15Z")

</div>

I appear to have come across a bug in the copy module in ansible 1.3.2. The following task in one of my playbooks fails:

- name: cron job to clean up raw files  
copy: src=clean\_up\_rawfiles dest=/etc/cron.daily owner=root group=root mode=555

This fails with:

fatal: [[rrc15.ripe.net](http://rrc15.ripe.net)] =\> Traceback (most recent call last):  
File “/usr/lib/python2.6/site-packages/ansible/runner/ **init**.py”, line 382, in \_executor  
exec\_rc = self.\_executor\_internal(host, new\_stdin)  
File “/usr/lib/python2.6/site-packages/ansible/runner/ **init**.py”, line 471, in \_executor\_internal  
return self.\_executor\_internal\_inner(host, self.module\_name, self.module\_args, inject, port, complex\_args=complex\_args)  
File “/usr/lib/python2.6/site-packages/ansible/runner/ **init**.py”, line 654, in \_executor\_internal\_inner  
result = handler.run(conn, tmp, module\_name, module\_args, inject, complex\_args)  
File “/usr/lib/python2.6/site-packages/ansible/runner/action\_plugins/copy.py”, line 173, in run  
module\_args.pop(‘raw’)  
AttributeError: ‘str’ object has no attribute ‘pop’

I don’t know what the problem is, but I am certain that the presence of the word “raw” in the module arguments is causing this issue. If I change the name of the file to something else NOT containing the word “raw”, it works just fine. Of course, I can work around this bug for now by renaming this file, but this bug should be fixed. Moreover, it looks like the copy module looks for an argument called “raw” (according to the top of the module) but it isn’t documented.

Regards,

Anand

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan2](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Post date:** [October 23, 2013, 6:49pm UTC](https://forum.ansible.com/t/bug-in-copy-module-ansible-1-3-2/13753/2 "2013-10-23T18:49:45Z")

</div>

This is a known issue, we’re probably looking to cut a minor update to 1.3.X to include a fix for this, likely this Friday.

The fix is already applied to the development branch.
