actually use the product filter instead of cartesian lookup
--
Brian Coca
--
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
Hmm, would the cartesian lookup help you?
https://docs.ansible.com/ansible/latest/plugins/lookup/cartesian.html
On Wednesday, November 14, 2018 at 8:05:32 AM UTC, saisum...@gmail.com
wrote:
>
> Hi I have seen ur resolutions in this page i.
>
> I am also having the same issue with nested loops .
Hi I have seen ur resolutions in this page i.
I am also having the same issue with nested loops .
my scenario is nothing but th*e matrix multiplication of n*n*
Can some one please suggest how to implement it using ansible loops along
with adding conidition of count ++ and count --
On Monday,
Guillaume,
I have exactly the same problem with setting up OSD via ADM host and I was
pulling my hair for 2 days.
I don't know how to thank you:)
On Wednesday, December 11, 2013 at 3:24:37 PM UTC+1, Guillaume Subiron
wrote:
>
> After reading nested.py and realizing it would never do what I
Have a look at the with_subelements lookup plugin.
On 11 December 2013 09:53, Guillaume Subiron maet...@subiron.org 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 {{
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.
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.
Le 13/12/11 08:05, Michael DeHaan claviotta :
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.
That's right.
I'd probably just define a variable like
I think you probably want this:
- shell: echo {{ item.0 }}-{{item.1 }}
with_together:
- groups['ceph-OSDs']
- disks
this will print for the first host
osd0-sdb
osd1-sdb
and for the second host
osd0-sdb
osd0-sdc
osd1-sdb
osd1-sdc
Let me know if that works for you and if I'm
Hum, this is not what I'm looking for, because my action is not
executed on the ceph-OSDs, but on another host (a centralized admin
node).
In this playbook, I'm not doing anything on the ceph-OSDs.
What I need to do (only on my admin node) is :
- shell: echo {{ item.0 }}-{{ item.1 }}
After reading nested.py and realizing it would never do what I wanted,
I found a workaround.
On each ceph-ODSs :
- delegate_to: {{ ceph-admin }}
shell: echo {{ inventory_hostname }}-{{ item }}
with_items: disks
Anyway, thank you very much for your help :)
Le 13/12/11 14:53, Guillaume
11 matches
Mail list logo