Re: [ansible-project] Template paths

2014-10-29 Thread Joe Adams
After some more playing, I found that if I move my roles/ directory into the folder with the playbooks, things work like they used to work. However, if I move to roles/ directory anywhere higher in the hierarchy than the playbook, it seems that the path can not be resolved inside the template.

Re: [ansible-project] Template paths

2014-10-29 Thread Joe Adams
So is there no way to include from a folder other than the current role's folder? Is there no way to share/extend templates between roles? On Monday, October 27, 2014 4:25:33 PM UTC-4, Brian Coca wrote: > > It looks for the file in the "base" directory or in the templates/ > subdirectory. The "b

Re: [ansible-project] Template paths

2014-10-28 Thread Brian Coca
hmm, I've only tested this by invoking the templates through the modules (in that case ../../common/templates/iptables.j2 should work). I need to check env when calling template to see the base path (probably playbook relative) for doing the includes from inside the template engine. On Tue, Oct

Re: [ansible-project] Template paths

2014-10-28 Thread Joe Adams
I've tried that but I can't seem to get it to work. Here are the paths I've tried so far: common/templates/iptables.j2 ../common/templates/iptables.j2 ../../common/templates/iptables.j2 ../../../common/templates/iptables.j2 /absolute/path/to/common/templates/iptables.j2 I get the same error messa

Re: [ansible-project] Template paths

2014-10-28 Thread Brian Coca
assuming all roles are in the same directory, you could do relative paths to other roles' template directory. On Tue, Oct 28, 2014 at 6:34 AM, Joe Adams wrote: > So is there no way of including or extending templates from other roles? > It would seem that this is a really powerful feature of the

Re: [ansible-project] Template paths

2014-10-28 Thread Joe Adams
So is there no way of including or extending templates from other roles? It would seem that this is a really powerful feature of the templating language that would make many configurations more versatile and powerful. Is what I'm trying to do not possible with Ansible? On Monday, October 27, 20

Re: [ansible-project] Template paths

2014-10-27 Thread Brian Coca
It looks for the file in the "base" directory or in the templates/ subdirectory. The "base" directory is the directory of the current play or role. On Mon, Oct 27, 2014 at 6:31 AM, Joe Adams wrote: > Is there somewhere that documents what paths are searched when inside a > template or in include

Re: [ansible-project] Template paths

2014-10-27 Thread Joe Adams
Is there somewhere that documents what paths are searched when inside a template or in include calls from within a template? I can't find much information about this at all. On Wednesday, October 22, 2014 9:22:05 AM UTC-4, Joe Adams wrote: > > I originally though it might be permissions, but bo

Re: [ansible-project] Template paths

2014-10-22 Thread Joe Adams
I originally though it might be permissions, but both templates are 0664 with my account being owner. I'm using ansible version 1.7.2 On Tuesday, October 21, 2014 11:51:08 PM UTC-4, Michael DeHaan wrote: > > For starters, what ansible version are you using? > > On Tue, Oct 21, 2014 at 6:02 PM,

Re: [ansible-project] Template paths

2014-10-21 Thread Michael DeHaan
For starters, what ansible version are you using? On Tue, Oct 21, 2014 at 6:02 PM, John Favorite wrote: > permissions issue? > > On Tue, Oct 21, 2014 at 5:35 PM, Joe Adams wrote: > >> I tried asking the IRC channel but I didn't get any responses so I figure >> that the mailing list might be bet

Re: [ansible-project] Template paths

2014-10-21 Thread John Favorite
permissions issue? On Tue, Oct 21, 2014 at 5:35 PM, Joe Adams wrote: > I tried asking the IRC channel but I didn't get any responses so I figure > that the mailing list might be better suited to this question. I'm trying > to build an extensible iptables template. All of my hosts will need some

[ansible-project] Template paths

2014-10-21 Thread Joe Adams
I tried asking the IRC channel but I didn't get any responses so I figure that the mailing list might be better suited to this question. I'm trying to build an extensible iptables template. All of my hosts will need some amount of custom rules to be added so I feel that extending a template wou