enigmatic traceback

Hi,

I got this traceback when trying to run a playbook with ansible 1.8 on
Debian Wheezy :

Traceback (most recent call last):
File "/usr/bin/ansible-playbook", line 324, in <module>
sys.exit(main(sys.argv[1:]))
File "/usr/bin/ansible-playbook", line 264, in main
pb.run()
File "/usr/lib/pymodules/python2.7/ansible/playbook/__init__.py", line
313, in run
play = Play(self, play_ds, play_basedir, vault_password=self.vault_password)
File "/usr/lib/pymodules/python2.7/ansible/playbook/play.py", line 165,
in __init__
self._tasks = self._load_tasks(self._ds.get('tasks', ), load_vars)
File "/usr/lib/pymodules/python2.7/ansible/playbook/play.py", line 598,
in _load_tasks
loaded = self._load_tasks(data, mv, default_vars, included_sudo_vars,
list(included_additional_conditions), original_file=include_filename,
role_name=new_role)
File "/usr/lib/pymodules/python2.7/ansible/playbook/play.py", line 606,
in _load_tasks
role_name=role_name
File "/usr/lib/pymodules/python2.7/ansible/playbook/task.py", line 69,
in __init__
if x in utils.plugins.module_finder:
File "/usr/lib/pymodules/python2.7/ansible/utils/plugins.py", line 186,
in has_plugin
return self.find_plugin(name) is not None
File "/usr/lib/pymodules/python2.7/ansible/utils/plugins.py", line 175,
in find_plugin
for i in self._get_paths():
File "/usr/lib/pymodules/python2.7/ansible/utils/plugins.py", line 138,
in _get_paths
ret.extend(self._get_package_paths())
File "/usr/lib/pymodules/python2.7/ansible/utils/plugins.py", line 94,
in _get_package_paths
m = __import__(self.package)
ImportError: No module named modules

Does anyone know what this is about ?

Thank you, regards

How did you install 1.8? Ansible now uses sub modules for a few paths, so you need to make sure you follow:

You can find instructions here for a variety of platforms. If you decide to go with the development branch, be sure to run “git submodule update --init --recursive” after doing a checkout.

FWIW Matt - Ansible will produce more human readable errors when a submodule isn’t checked out.

But yeah, I’m curious how this was installed.

Hi,

Doing “make deb” without getting the latest submodules first would leave some things out, yes.

(I’m still curious why it tracebacked versus giving you the “can’t find modules” friendly message)

Guys, please make it throw something better then python exception! I’ve spent damn half an hour trying to run my playbooks ;(