Debugging connection issues

I’m getting the dreaded “Unable to open shell” error when trying to run playbooks against my network devices in AWX. Typically I would set ANSIBLE_DEBUG and ANSIBLE_LOG_PATH environment variables to debug…how can I do the same when launching a job from a template in AWX?

I was able to get more logging enabled by setting the ‘log_path’ option in ansible.cfg. Now I see this:

2017-10-18 17:00:19,094 p=4009 u=root | Traceback (most recent call last):

`

File “/usr/bin/ansible-connection”, line 316, in main

server = Server(socket_path, pc)

File “/usr/bin/ansible-connection”, line 111, in init

self.connection = connection_loader.get(play_context.connection, play_context, sys.stdin)

File “/usr/lib/python2.7/site-packages/ansible/plugins/loader.py”, line 363, in get

self._module_cache[path] = self._load_module_source(name, path)

File “/usr/lib/python2.7/site-packages/ansible/plugins/loader.py”, line 339, in _load_module_source

module = imp.load_source(full_name, path, module_file)

File “/usr/lib/python2.7/site-packages/ansible/plugins/connection/netconf.py”, line 90, in

raise AnsibleError(“ncclient is not installed”)

AnsibleError: ncclient is not installed

`

I know that ncclient was a new pre-requisite added in 2.3, but it doesn’t appear that it’s installed in awx_task by default.

We’re working on a system which would allow you to manage this in a better way but for the moment if you need more dependencies you may need to create your own image based on ours as a base and add that dependency.

Understood. But in this case, this is really an ansible dependency and should be included in the awx_task build by default. This package is required for using many network modules in 2.3+.

I understand how you feel, there are a lot of separate dependencies for modules on Ansible. In general we don’t want to add all of them but perhaps this is one that we could include if you wanted to submit it as a PR?