Re: [ansible-project] Re: nested dictionary access

2014-10-01 Thread Sergey Sudakovich
Thank you, ended up flattening it and using subelements. On Wednesday, October 1, 2014 5:15:17 AM UTC-7, Michael DeHaan wrote: > > Restructing it slightly, you could use the "with_subelements" lookup: > > http://docs.ansible.com/playbooks_loops.html#looping-over-subelements > > > > On Wed, Oct 1,

Re: [ansible-project] Re: nested dictionary access

2014-10-01 Thread Michael DeHaan
Restructing it slightly, you could use the "with_subelements" lookup: http://docs.ansible.com/playbooks_loops.html#looping-over-subelements On Wed, Oct 1, 2014 at 3:35 AM, Serge van Ginderachter < se...@vanginderachter.be> wrote: > You can iterate through it in a jinja template, though only fo

Re: [ansible-project] Re: nested dictionary access

2014-10-01 Thread Serge van Ginderachter
You can iterate through it in a jinja template, though only for a fixed depth as you would need to code each iteration level manually (AFAIK) {% for p in ppools %} {% for devices in ppools[p].devices %} etc On 1 October 2014 09:28, Sergey Sudakovich wrote: > It looks like I will need to flatten

[ansible-project] Re: nested dictionary access

2014-10-01 Thread Sergey Sudakovich
It looks like I will need to flatten out the structure, just want somebody to confirm that there is no other obvious way. On Tuesday, September 30, 2014 10:24:29 PM UTC-7, Sergey Sudakovich wrote: > > I have a dictionary like this: > ppools: > one: > devices: > - abc >