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 .

On Tuesday, January 26, 2016 at 1:23:59 PM UTC-5, Nicolas G wrote:
>
> 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]: 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 ?
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/b6b1dd80-d0ef-4de3-ac32-12e08d486ff1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to