Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing on ansible 1.9 #14

Open
Eyjafjallajokull opened this issue Mar 4, 2016 · 3 comments
Open

Failing on ansible 1.9 #14

Eyjafjallajokull opened this issue Mar 4, 2016 · 3 comments

Comments

@Eyjafjallajokull
Copy link

Hey,
When using ansible 1.9 and installing this plugin with

wget https://raw.githubusercontent.com/jlafon/ansible-profile/master/callback_plugins/profile_tasks.py

I get following error when running ansible:

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 210, in main
    force_handlers=options.force_handlers,
  File "/usr/lib/pymodules/python2.7/ansible/playbook/__init__.py", line 181, in __init__
    ansible.callbacks.load_callback_plugins()
  File "/usr/lib/pymodules/python2.7/ansible/callbacks.py", line 51, in load_callback_plugins
    callback_plugins = [x for x in utils.plugins.callback_loader.all()]
  File "/usr/lib/pymodules/python2.7/ansible/utils/plugins.py", line 232, in all
    self._module_cache[path] = imp.load_source('.'.join([self.package, name]), path)
  File "/usr/share/ansible_plugins/callback_plugins/profile_tasks.py", line 4, in <module>
    from ansible.plugins.callback import CallbackBase
ImportError: No module named plugins.callback

Please tag commit 168cb09 which is compatible with 1.9 and update readme with something like:

wget https://raw.githubusercontent.com/jlafon/ansible-profile/v1.9/callback_plugins/profile_tasks.py
@pastephens
Copy link

Hi, what am I not doing or doing wrong?

ansible --version
ansible 1.9.4
configured module search path = /usr/share/ansible

Traceback (most recent call last):
File "/usr/bin/ansible-playbook", line 324, in
sys.exit(main(sys.argv[1:]))
File "/usr/bin/ansible-playbook", line 210, in main
force_handlers=options.force_handlers,
File "/usr/lib/python2.7/site-packages/ansible/playbook/init.py", line 181, in init
ansible.callbacks.load_callback_plugins()
File "/usr/lib/python2.7/site-packages/ansible/callbacks.py", line 51, in load_callback_plugins
callback_plugins = [x for x in utils.plugins.callback_loader.all()]
File "/usr/lib/python2.7/site-packages/ansible/utils/plugins.py", line 232, in all
self._module_cache[path] = imp.load_source('.'.join([self.package, name]), path)
File "/home/stephens1/ansible/callback_plugins/profile_tasks.py", line 4, in
from ansible.plugins.callback import CallbackBase
ImportError: No module named plugins.callback

@fridim
Copy link

fridim commented Jun 8, 2016

same here:

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 210, in main
    force_handlers=options.force_handlers,
  File "/usr/lib/python2.7/site-packages/ansible/playbook/__init__.py", line 181, in __init__
    ansible.callbacks.load_callback_plugins()
  File "/usr/lib/python2.7/site-packages/ansible/callbacks.py", line 51, in load_callback_plugins
    callback_plugins = [x for x in utils.plugins.callback_loader.all()]
  File "/usr/lib/python2.7/site-packages/ansible/utils/plugins.py", line 232, in all
    self._module_cache[path] = imp.load_source('.'.join([self.package, name]), path)
  File "/home/jenkins/workspace/rcip-openshift-ansible-openstack-functional-tests/rcip-openshift-ansible/callback_plugins/profile_tasks.py", line 4, in <module>
    from ansible.plugins.callback import CallbackBase
ImportError: No module named plugins.callback

i'm not sure the line from ansible.plugins.callback import CallbackBase is needed for 1.9

see:
https://github.com/ansible/ansible/tree/stable-1.9/plugins/callbacks

@oalders
Copy link

oalders commented Sep 8, 2016

Since the tag hasn't been created as requested by @Eyjafjallajokull, this should work in the meantime:

wget https://raw.githubusercontent.com/jlafon/ansible-profile/168cb0996fd1b8b5f27d515e87b1c4154078b6b0/callback_plugins/profile_tasks.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants