# Different behaviour copying templates between centos 6.5 and 7

**URL:** <https://forum.ansible.com/t/different-behaviour-copying-templates-between-centos-6-5-and-7/16934>\
**Category:** Ansible Project\
**Created:** [December 2, 2014, 8:39am UTC](https://forum.ansible.com/t/different-behaviour-copying-templates-between-centos-6-5-and-7/16934 "2014-12-02T08:39:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marc\_Roelofs](https://avatars.discourse-cdn.com/v4/letter/m/a3d4f5/32.png) [@Marc\_Roelofs](https://forum.ansible.com/u/Marc_Roelofs)\
**Post date:** [December 2, 2014, 8:39am UTC](https://forum.ansible.com/t/different-behaviour-copying-templates-between-centos-6-5-and-7/16934/1 "2014-12-02T08:39:04Z")

</div>

Hi All,

I am experiencing something weird.  
I have a couple of template files I need to copy over to different CentOS versions.  
The task is simple :

# copy file

- name: copy my-files  
template: src={{ item }} dest=/etc/my-destination/  
with\_items:
- file1
- file3
- file3
- file4
- file5
- file6  
when: ansible\_distribution == ‘CentOS’

Running this will state in green “OK” for centos 6.5 machines, but in Yellow changed for CentOS 7 machines every run .  
I also have some line in file like replacements which does exactly the same .  
Somehow ansible changes/replaces files on Centos 7 even when they are not changed  
md5sum on source and destination are the same

BTW When I use the copy command every time the plabook is run, it copies them over on both os-sses, and using template command doesn’t on centos6.5 at least

---

<div class="post-metadata">

**Author:** ![Mirko\_Friedenhagen](https://avatars.discourse-cdn.com/v4/letter/m/838e76/32.png) [@Mirko\_Friedenhagen](https://forum.ansible.com/u/Mirko_Friedenhagen)\
**Post date:** [December 2, 2014, 9:09am UTC](https://forum.ansible.com/t/different-behaviour-copying-templates-between-centos-6-5-and-7/16934/2 "2014-12-02T09:09:09Z")

</div>

Hello,

I am seeing this kind of flakiness as well on Debian Wheezy. Every other execution of a playbook will result in copy actions marked as changed (not even template, just copy). Same with lineinfile.

Regards  
Mirko

---

<div class="post-metadata">

**Author:** ![Toshio\_Kuratomi](https://avatars.discourse-cdn.com/v4/letter/t/41988e/32.png) [@Toshio\_Kuratomi](https://forum.ansible.com/u/Toshio_Kuratomi)\
**Post date:** [December 3, 2014, 5:56am UTC](https://forum.ansible.com/t/different-behaviour-copying-templates-between-centos-6-5-and-7/16934/3 "2014-12-03T05:56:29Z")

</div>

I was unable to replicate this running ansible-1.8.1 on fedora20 and  
copying to centos7. Neither with the template module or straight  
copy. What version of ansible are you using? Is there anthing else  
you can tell us about the specifics? What the real filenames are or  
some of their contents? Is this reproducible with fewer files? Is it  
happening even if the templates have nothing to substitute?

-Toshio
