From 777b6d3e3098cbcf9f7e1f6d1b8f5fe04db5cf64 Mon Sep 17 00:00:00 2001 From: roberbri Date: Wed, 18 Dec 2019 21:35:35 +0000 Subject: [PATCH] Force values to be sorted when compared. (#65315) * Force values to be sorted when compared. This avoids problems where lists of values could be generated in indeterminate order. * Update lib/ansible/module_utils/aws/elbv2.py Thank you felixfontein, sorry I missed this detail. Co-Authored-By: Felix Fontein --- lib/ansible/module_utils/aws/elbv2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/module_utils/aws/elbv2.py b/lib/ansible/module_utils/aws/elbv2.py index ba796abaaf2..0b68bde3a4c 100644 --- a/lib/ansible/module_utils/aws/elbv2.py +++ b/lib/ansible/module_utils/aws/elbv2.py @@ -720,7 +720,7 @@ class ELBListenerRules(object): current_condition['SourceIpConfig']['Values'][0] == condition['SourceIpConfig']['Values'][0]): condition_found = True break - elif current_condition['Field'] == condition['Field'] and current_condition['Values'] == condition['Values']: + elif current_condition['Field'] == condition['Field'] and sorted(current_condition['Values']) == sorted(condition['Values']): condition_found = True break