From 3f225e7ec732799587faf43e8e36298b69c6d72d Mon Sep 17 00:00:00 2001 From: Baptiste Jonglez Date: Fri, 25 May 2018 15:57:33 +0200 Subject: [PATCH] Remove deprecated dict.iteritems method It caused ansible to fail with: fatal: [XXX]: FAILED! => {"changed": false, "msg": "AnsibleUndefinedVariable: 'dict object' has no attribute 'iteritems'"} This method has been removed in Python3: https://docs.ansible.com/ansible/2.5/dev_guide/testing/sanity/no-dict-iteritems.html --- templates/config.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/config.j2 b/templates/config.j2 index 85fe44d..e549ff2 100644 --- a/templates/config.j2 +++ b/templates/config.j2 @@ -15,14 +15,14 @@ server: {% if nsd_server_config is defined %} # Common configuration -{% for key, value in nsd_server_config.iteritems() -%} +{% for key, value in nsd_server_config.items() -%} {{ expand_list(key, value) }} {%- endfor %} {% endif %} {% if nsd_local_server_config is defined %} # Local configuration -{% for key, value in nsd_local_server_config.iteritems() -%} +{% for key, value in nsd_local_server_config.items() -%} {{ expand_list(key, value) }} {%- endfor %} {% endif %}