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/20200206115552.59dfbc9e%40gmail.com.
pgp97Jd7MYcxy.pgp
Description: OpenPGP digital signature
