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

Using ara #19

Open
varunchopra opened this issue Jul 20, 2018 · 4 comments
Open

Using ara #19

varunchopra opened this issue Jul 20, 2018 · 4 comments

Comments

@varunchopra
Copy link

Has anyone managed to get openstack/ara to work with Suitable?

Right off the bat, this is what you get without any configuration:

 [WARNING]: Failure using method (v2_playbook_on_task_start) in callback plugin (<ansible.plugins.callback./home/ubuntu/.local/lib/python2.7/site-
packages/ara/plugins/callbacks/log_ara.CallbackModule object at 0x7fbbd9bd3650>): 'NoneType' object has no attribute 'path'

 [WARNING]: Failure using method (v2_runner_on_ok) in callback plugin (<ansible.plugins.callback./home/ubuntu/.local/lib/python2.7/site-
packages/ara/plugins/callbacks/log_ara.CallbackModule object at 0x7fbbd9bd3650>): 'NoneType' object has no attribute 'name'
@href
Copy link
Contributor

href commented Jul 30, 2018

I've had a brief look at this and it looks like I'd need to improve the plugin story of Suitable. Currently you can only install strategy plugins (for Mitogen support):

suitable/suitable/api.py

Lines 263 to 280 in 1cea463

def install_strategy_plugins(directories):
""" Loads the given strategy plugins, which is a list of directories,
a string with a single directory or a string with multiple directories
separated by colon.
As these plugins are globally loaded and cached by Ansible we do the same
here. We could try to bind those plugins to the Api instance, but that's
probably not something we'd ever have much of a use for.
Call this function before using custom strategies on the :class:`Api`
class.
"""
if isinstance(directories, str):
directories = directories.split(':')
for directory in directories:
strategy_loader.add_directory(directory)

Then the plugins could be registered as described in Ara's documentation:
https://ara.readthedocs.io/en/latest/configuration.html

@href
Copy link
Contributor

href commented Jul 30, 2018

Note that you might be able to get this working using the environment variables (I haven't tested it), as described in the docs:

$ python -m ara.setup.env
export ANSIBLE_CALLBACK_PLUGINS=/usr/lib/python2.7/site-packages/ara/plugins/callbacks
export ANSIBLE_ACTION_PLUGINS=/usr/lib/python2.7/site-packages/ara/plugins/actions
export ANSIBLE_LIBRARY=/usr/lib/python2.7/site-packages/ara/plugins/modules

@varunchopra
Copy link
Author

There seems to be an issue with Ara itself (for me at least) so I'm just letting this one go.

Their git repo doesn't have an issues section either. Sucks.

I'll just give Suitable and Mito a whirl. 💃

@dmsimard
Copy link

@chopraaa can you provide a script or a procedure to reproduce the issue ? It would allow me to investigate and verify if there is indeed a problem with ARA. Thanks !

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

3 participants