Organize the template directory within the roles folder
42 views
Skip to first unread message
Ajay Divakaran
unread,
Oct 19, 2014, 7:02:12 AM10/19/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ansible...@googlegroups.com
Hi all,
According to the documentation the template files should sit in the top directory of the templates folder for a given role. Does Ansible recognize the template files if the template directory is organized into sub folders?
e.g
roles
x
templates
folder1
template1.j2
folder2
template2.js
usage of template module in task for role x
template: src=/folder1/template1.js dest=/opt/foo
Michael Peters
unread,
Oct 22, 2014, 4:15:47 PM10/22/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ansible...@googlegroups.com
It does, but the path is relative, not absolute. Try (notice missing
"/" prefix on src):