Hi Vladimir,
I have tried  a lot but unable to find solution  for my issue. Pls help on
this

On Thu, 6 Feb 2020, 16:38 Rakesh Parida, <[email protected]> wrote:

> Hi Vladimir,
>
> I would like my o/p as below:
> dp-steps-common-3.0.12 not equal to
> dp-steps-common-3.0.15-1911280809_d103a.noarch
>
> iam-service-default-3.1.37 is equal to
> iam-service-default-3.1.37-1911141021_63e48.noarch
>
> iam-python-common-1.0.1 not found in list2
>
>
> On Thursday, February 6, 2020 at 4:26:16 PM UTC+5:30, Vladimir Botka wrote:
>>
>> On Thu, 6 Feb 2020 00:42:28 -0800 (PST)
>> Rakesh Parida <[email protected]> wrote:
>>
>> > If the numbers of items in list is not equal is there way to compare:
>> > suppose my lists are:
>> >       list1
>> >             "dp-steps-common-3.0.12",
>> >             "iam-python-common-1.0.1",
>> >             "iam-service-default-3.1.37"
>> >       list2:
>> >             "dp-steps-common-3.0.15-1911280809_d103a.noarch",
>> >             "iam-service-default-3.1.37-1911141021_63e48.noarch"
>> >
>> >     - name: If the List comparision is not equal
>> >       debug:
>> >         msg: "{{ item.0 }} is not equal to {{ item.1 }}"
>> >       loop: "{{ list1|sort|zip(list2|sort)|list }}"
>> >       when: item.0.split('-')[-1] is not version(item.1.split('-')[-2])
>>
>> Do you know what you would like to get as a result?
>>
> --
> 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].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/ee10c6c9-f63e-48da-9f2d-b6aca847151b%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/ee10c6c9-f63e-48da-9f2d-b6aca847151b%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAPKxTaCskoVNbEjroC1Vc87ToHvOri9_2GUTkV0G%2BH3weYkgtw%40mail.gmail.com.

Reply via email to