Before we dive into a technical solution let me understand your use case
and what you are modelling a bit better.

So groups['ceph-ODSs'] would be all machines in the ceph-ODSs group.

I'd probably just define a variable like "disks" on the group, but I'm
unclear why that wouldn't work in your case.

I could probably understand more if I could see how "disks" differs between
hosts.




On Wed, Dec 11, 2013 at 5:40 AM, Guillaume Subiron <[email protected]>wrote:

> Le 13/12/11 11:18, Serge van Ginderachter claviotta :
> > Have a look at the with_subelements lookup plugin.
>
> I know very well with_subelements, but in this case I'm not trying to
> access a subelement in the first element, I'm trying to use the first
> element to access an entry in an other dictionary.
>
> I don't think with_subelements is well suited to this case. Do you
> have an example ?
>
> >
> >
> > On 11 December 2013 09:53, Guillaume Subiron <[email protected]>
> wrote:
> >
> > > Hi,
> > >
> > > I'm trying to do a special kind of nesting loop, using the item of the
> > > first loop in the second loop:
> > >
> > > - name: Prepare OSDs
> > >   shell: ceph-deploy osd prepare {{ item[0] }}:{{ item[1] }}
> > >   with_nested:
> > >     - groups['ceph-ODSs']
> > >     - hostvars[item[0]]['disks']
> > >
> > > I'm not sure if this is possible, but I can't find any workaround.
> > >
>
> --
> Guillaume Subiron
>   Mail - [email protected]
>    GPG - C7C4 455C
> Jabber - [email protected]
>    IRC - maethor@(freenode|geeknode)
>
> --
> 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 [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
Michael DeHaan <[email protected]>
CTO, AnsibleWorks, Inc.
http://www.ansibleworks.com/

-- 
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to