From 6d4618f46f20f0e02922441f9253c24b1c6749bb Mon Sep 17 00:00:00 2001 From: Marius Gedminas Date: Thu, 24 Sep 2015 12:50:00 +0300 Subject: [PATCH] Python 3: there's no dict.iteritems() --- lib/ansible/vars/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ansible/vars/__init__.py b/lib/ansible/vars/__init__.py index 0d5ea5a09d..06e8876d51 100644 --- a/lib/ansible/vars/__init__.py +++ b/lib/ansible/vars/__init__.py @@ -24,6 +24,7 @@ import os from collections import defaultdict from collections import MutableMapping +from six import iteritems from jinja2.exceptions import UndefinedError try: @@ -285,7 +286,7 @@ class VariableManager: if self._inventory is not None: all_vars['groups'] = dict() - for (group_name, group) in self._inventory.groups.iteritems(): + for (group_name, group) in iteritems(self._inventory.groups): all_vars['groups'][group_name] = [h.name for h in group.get_hosts()] if include_hostvars: