Hey guys,
I haven’t posted a question on here for a wee bit. Which is amazing, because Roots has been working pretty damn flawlessly for me.
But the last project I spun up, I had some issue when vagranting up. Took me a few hours to work out. It was a matter of having Ansible v2.0.0.2, but it seemed to want v2.0.2.0.
I tried updating it via pip.
When that failed I tried using homebrew.
I went back to pip, figured out the upgrade, then everything worked fine. Provisioned, deployed to staging.
Until today when I went to go provision and deploy, it said:
ERROR! Unexpected Exception: 'AnsibleMapping' object has no attribute 'iteritems'
Verbose output:
Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.4/bin/ansible-playbook", line 86, in <module> sys.exit(cli.run()) File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/ansible/cli/playbook.py", line 128, in run inventory = Inventory(loader=loader, variable_manager=variable_manager, host_list=self.options.inventory) File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/ansible/inventory/__init__.py", line 85, in __init__ self.parse_inventory(host_list) File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/ansible/inventory/__init__.py", line 147, in parse_inventory host.vars = combine_vars(host.vars, self.get_host_variables(host.name)) File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/ansible/inventory/__init__.py", line 540, in get_host_variables self._vars_per_host[hostname] = self._get_host_variables(hostname, vault_password=vault_password) File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/ansible/inventory/__init__.py", line 558, in _get_host_variables vars_results = [ plugin.get_host_vars(host, vault_password=vault_password) for plugin in self._vars_plugins if hasattr(plugin, 'get_host_vars')] File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/ansible/inventory/__init__.py", line 558, in <listcomp> vars_results = [ plugin.get_host_vars(host, vault_password=vault_password) for plugin in self._vars_plugins if hasattr(plugin, 'get_host_vars')] File "/Users/masoninthesis/Sites/jackalopeio-v2.0/trellis/lib/trellis/plugins/vars/vars.py", line 40, in get_host_vars self.wrap_salts_in_raw(host, host.get_group_vars()) File "/Users/masoninthesis/Sites/jackalopeio-v2.0/trellis/lib/trellis/plugins/vars/vars.py", line 25, in wrap_salts_in_raw for name, site in hostvars['vault_wordpress_sites'].iteritems(): AttributeError: 'AnsibleMapping' object has no attribute 'iteritems'
I know this isn’t entirely Roots related. Seems more Ansible related than anything. But it’s strange that my deploy worked fine a couple days ago, fast forward– I didn’t touch Ansible or Trellis, and it stopped working.
Any tips would be so lovely. Thanks!