From 362c86d3235c434b97f779cfbafe2f1a2df53b92 Mon Sep 17 00:00:00 2001 From: Tim Rupp Date: Tue, 13 Dec 2016 15:54:46 -0800 Subject: [PATCH] Fixes map call usage For the comparisions that need to be done, this map call needs to convert to a list because the six import in ansible changes the behavior of map to return an iterator instead of a list --- lib/ansible/modules/network/f5/bigip_virtual_server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/modules/network/f5/bigip_virtual_server.py b/lib/ansible/modules/network/f5/bigip_virtual_server.py index ddcf2cd0e6a..0626e5ff265 100644 --- a/lib/ansible/modules/network/f5/bigip_virtual_server.py +++ b/lib/ansible/modules/network/f5/bigip_virtual_server.py @@ -250,7 +250,7 @@ def set_rules(api, name, rules_list): return False rules_list = list(enumerate(rules_list)) try: - current_rules = map(lambda x: (x['priority'], x['rule_name']), get_rules(api, name)) + current_rules = [(x['priority'], x['rule_name']) for x in get_rules(api, name)] to_add_rules = [] for i, x in rules_list: if (i, x) not in current_rules: