[ansible-project] Re: Iterating over a list in a dictionary within a Jinja2 template

2015-12-14 Thread cmacrae
So, I solved what I wanted to do :) For anyone interested, here's how I got it working: Bot definition looks like this: hubot_bots: testbot: owner: 'Bot Wrangler ' name: Hubot descr: Delightfully aware robutt adapter: rocketchat environment:

[ansible-project] Re: Iterating over a list in a dictionary within a Jinja2 template

2015-12-14 Thread cmacrae
So, I solved what I wanted to do :) For anyone interested, here's how I got it working: Bot definition looks like this: hubot_bots: testbot: owner: 'Bot Wrangler ' name: Hubot descr: Delightfully aware robutt adapter: rocketchat environment: -

[ansible-project] Re: Iterating over a list in a dictionary within a Jinja2 template

2015-12-11 Thread cmacrae
Thanks Mike! I'll take a go at using this :) On Tuesday, 8 December 2015 15:06:08 UTC, Mike Biancaniello wrote: > > First, in your j2, you can't ever reference `item` without `item.key` or > `item.value`. > > However, I think your amin problem is that your first iteration is a dict > (not a

[ansible-project] Re: Iterating over a list in a dictionary within a Jinja2 template

2015-12-08 Thread Mike Biancaniello
First, in your j2, you can't ever reference `item` without `item.key` or `item.value`. However, I think your amin problem is that your first iteration is a dict (not a list) and the second is a list of dicts without deterministic keys. Try this: hubot_bots: testbot: owner: 'Bot Wrangler