# Ansible 2 template src path changed ?

**URL:** <https://forum.ansible.com/t/ansible-2-template-src-path-changed/20353>\
**Category:** Ansible Project\
**Created:** [January 26, 2016, 6:23pm UTC](https://forum.ansible.com/t/ansible-2-template-src-path-changed/20353 "2016-01-26T18:23:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nicolas\_G](https://avatars.discourse-cdn.com/v4/letter/n/a183cd/32.png) [@Nicolas\_G](https://forum.ansible.com/u/Nicolas_G)\
**Post date:** [January 26, 2016, 6:23pm UTC](https://forum.ansible.com/t/ansible-2-template-src-path-changed/20353/1 "2016-01-26T18:23:59Z")

</div>

Hi

I have the bellow template stored under the shared role but it’s been deployed by other roles as in our web role in our example :

# roles/shared/templates/config.conf.j2

#roles/web/taks/main.yml :  
`

- name: deploy config  
template: src=config.conf.j2 dest=/etc/project/config.conf

`

In Ansible 1.9.4 the above works.

In Ansible 2.0.0.2 this fails :

`  
TASK [web : deploy config] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
fatal: [[server001.example.com](http://server001.example.com)]: FAILED! =\> {“changed”: false, “failed”: true, “msg”: “IOError: [Errno 2] No such file or directory: u’/src/Ansible/config.conf.j2’”}

`

In order for this to work on version 2 I have to change the src path to **../shared/templates/config.conf.j2** but this will break compatibility with Ansible version 1 :

`  
roles/web/taks/main.yml :

- name: deploy config  
template: src=../shared/templates/config.conf.j2 dest=/etc/project/config.conf

`

Can someone confirm if this is a change in Ansible version 2 or should report a bug ?

---

<div class="post-metadata">

**Author:** ![Nicolas\_G](https://avatars.discourse-cdn.com/v4/letter/n/a183cd/32.png) [@Nicolas\_G](https://forum.ansible.com/u/Nicolas_G)\
**Post date:** [January 27, 2016, 6:48pm UTC](https://forum.ansible.com/t/ansible-2-template-src-path-changed/20353/2 "2016-01-27T18:48:57Z")

</div>

As suggested by James Camarata in the webinar , the template module code has changed a lot.

I’v created an issue in [https://github.com/ansible/ansible/issues/14161](https://github.com/ansible/ansible/issues/14161) .
