# Empty file while copying from localhost

**URL:** <https://forum.ansible.com/t/empty-file-while-copying-from-localhost/31620>\
**Category:** Ansible Project\
**Created:** [November 7, 2019, 8:31pm UTC](https://forum.ansible.com/t/empty-file-while-copying-from-localhost/31620 "2019-11-07T20:31:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alain\_Gilbert](https://avatars.discourse-cdn.com/v4/letter/a/c5a1d2/32.png) [@Alain\_Gilbert](https://forum.ansible.com/u/Alain_Gilbert)\
**Post date:** [November 7, 2019, 8:31pm UTC](https://forum.ansible.com/t/empty-file-while-copying-from-localhost/31620/1 "2019-11-07T20:31:40Z")

</div>

I have a bug with Ansible 2.8.3.  
I create a vm from a template and one of my step is to copy a local file to the remote server.  
When the last task (copy) is done and I reboot the server, the file exist but is empty.

Do you know why Ansible does’nt made the change ? There is no error… Is a cache is drop when I reboot the VM ?

- file: path=/etc/sysconfig/network-scripts/ifcfg-ens192 state=absent

delegate\_to: ‘{{m\_ip\_template}}’

- copy: src=/tmp/{{m\_serveur}}-ifcfg-ens192 dest=/etc/sysconfig/network-scripts/ifcfg-ens192 mode=600  
delegate\_to: ‘{{m\_ip\_template}}’
- … Reboot the server

Thanks !!!
