From b47c04a70e9f6cf3f1ea8b8cebbef5627d49c2ea Mon Sep 17 00:00:00 2001 From: Selivanov Pavel Date: Sun, 22 Apr 2018 11:03:31 +0300 Subject: [PATCH] Fixes #38985 (#39070) Changing interface dictionary while iterating over interface.keys() produced "RuntimeError: dictionary changed size during iteration" --- lib/ansible/modules/monitoring/zabbix/zabbix_host.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/modules/monitoring/zabbix/zabbix_host.py b/lib/ansible/modules/monitoring/zabbix/zabbix_host.py index f2ca94e124f..0a6edaae6e8 100644 --- a/lib/ansible/modules/monitoring/zabbix/zabbix_host.py +++ b/lib/ansible/modules/monitoring/zabbix/zabbix_host.py @@ -789,7 +789,7 @@ def main(): if not force or not interfaces: for interface in copy.deepcopy(exist_interfaces): # remove values not used during hostinterface.add/update calls - for key in interface.keys(): + for key in tuple(interface.keys()): if key in ['interfaceid', 'hostid', 'bulk']: interface.pop(key, None)