I want to compare two lists . But while doing this the list1 item loops over each item of list2. I just want item of list 1 just to compare between matching item in list2 and not with others.
TASK [If the List comparision is equal] *****************************************************************************************************************************************************
skipping: [localhost] => (item=[u'dp-steps-common-3.0.12', u'dp-steps-common-3.0.15-1911280809_d103a.noarch'])
skipping: [localhost] => (item=[u'dp-steps-common-3.0.12', u'iam-python-common-1.0.1-1910242116.noarch'])
skipping: [localhost] => (item=[u'dp-steps-common-3.0.12', u'iam-service-default-3.1.37-1911141021_63e48.noarch'])
skipping: [localhost] => (item=[u'iam-python-common-1.0.1', u'dp-steps-common-3.0.15-1911280809_d103a.noarch'])
ok: [localhost] => (item=[u'iam-python-common-1.0.1', u'iam-python-common-1.0.1-1910242116.noarch']) => {
"msg": " iam-python-common-1.0.1 is equal to iam-python-common-1.0.1-1910242116.noarch"
}
skipping: [localhost] => (item=[u'iam-python-common-1.0.1', u'iam-service-default-3.1.37-1911141021_63e48.noarch'])
skipping: [localhost] => (item=[u'iam-service-default-3.1.37', u'dp-steps-common-3.0.15-1911280809_d103a.noarch'])
skipping: [localhost] => (item=[u'iam-service-default-3.1.37', u'iam-python-common-1.0.1-1910242116.noarch'])
ok: [localhost] => (item=[u'iam-service-default-3.1.37', u'iam-service-default-3.1.37-1911141021_63e48.noarch']) => {
"msg": " iam-service-default-3.1.37 is equal to iam-service-default-3.1.37-1911141021_63e48.noarch"
}
TASK [If the List comparision is not equal] *************************************************************************************************************************************************
ok: [localhost] => (item=[u'dp-steps-common-3.0.12', u'dp-steps-common-3.0.15-1911280809_d103a.noarch']) => {
"msg": " dp-steps-common-3.0.12 is not equal to dp-steps-common-3.0.15-1911280809_d103a.noarch"
}
ok: [localhost] => (item=[u'dp-steps-common-3.0.12', u'iam-python-common-1.0.1-1910242116.noarch']) => {
"msg": " dp-steps-common-3.0.12 is not equal to iam-python-common-1.0.1-1910242116.noarch"
}
ok: [localhost] => (item=[u'dp-steps-common-3.0.12', u'iam-service-default-3.1.37-1911141021_63e48.noarch']) => {
"msg": " dp-steps-common-3.0.12 is not equal to iam-service-default-3.1.37-1911141021_63e48.noarch"
}
ok: [localhost] => (item=[u'iam-python-common-1.0.1', u'dp-steps-common-3.0.15-1911280809_d103a.noarch']) => {
"msg": " iam-python-common-1.0.1 is not equal to dp-steps-common-3.0.15-1911280809_d103a.noarch"
}
ok: [localhost] => (item=[u'iam-python-common-1.0.1', u'iam-python-common-1.0.1-1910242116.noarch']) => {
"msg": " iam-python-common-1.0.1 is not equal to iam-python-common-1.0.1-1910242116.noarch"
}
ok: [localhost] => (item=[u'iam-python-common-1.0.1', u'iam-service-default-3.1.37-1911141021_63e48.noarch']) => {
"msg": " iam-python-common-1.0.1 is not equal to iam-service-default-3.1.37-1911141021_63e48.noarch"
}
ok: [localhost] => (item=[u'iam-service-default-3.1.37', u'dp-steps-common-3.0.15-1911280809_d103a.noarch']) => {
"msg": " iam-service-default-3.1.37 is not equal to dp-steps-common-3.0.15-1911280809_d103a.noarch"
}
ok: [localhost] => (item=[u'iam-service-default-3.1.37', u'iam-python-common-1.0.1-1910242116.noarch']) => {
"msg": " iam-service-default-3.1.37 is not equal to iam-python-common-1.0.1-1910242116.noarch"
}
ok: [localhost] => (item=[u'iam-service-default-3.1.37', u'iam-service-default-3.1.37-1911141021_63e48.noarch']) => {
"msg": " iam-service-default-3.1.37 is not equal to iam-service-default-3.1.37-1911141021_63e48.noarch"
}