lookup('template') looks in files/ not templates/ ?

56 views
Skip to first unread message

Barry Kaplan

unread,
May 30, 2015, 11:49:13 PM5/30/15
to ansible...@googlegroups.com
I see that lookup('template') is looking in the files directory not the template directory.

fatal: [10.0.139.56] => Failed to template msg="{{lookup('template', 'rs_initiate_cmd.js.j2')}}": unable to read /Users/bkaplan/si/ops/ansible/playbooks/roles/mongodb/files/rs_initiate_cmd.js.j2


Is this expected or a bug? I can't find any docs on lookup('template') only the example in the Lookups section. (Have not looked at the code yet.)

Matt Martz

unread,
May 31, 2015, 9:49:23 AM5/31/15
to ansible...@googlegroups.com
It is expected.
--
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 ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/f884d62f-7013-43ac-a0a0-36ab18ac7212%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Matt Martz
@sivel
sivel.net

Brian Coca

unread,
Jun 1, 2015, 9:09:15 AM6/1/15
to ansible...@googlegroups.com
All lookups use files/, I agree this is confusing with template and
would contemplate adding the templates/ directories for this specific
plugin.
> https://groups.google.com/d/msgid/ansible-project/CAD8N0v_r0rT9fTvw%3DGpcULKAJ0s2U480O1LFGB99cbx0CCwDrg%40mail.gmail.com.
>
> For more options, visit https://groups.google.com/d/optout.



--
Brian Coca
Reply all
Reply to author
Forward
0 new messages