Project works in AAP but fails in AWX

I have Ansible Automation Platform and AWX set up in my lab so I can learn how to use these systems for network automation. I found a collection called ‘Network Toolkit’ by Sean Cavanaugh:

https://galaxy.ansible.com/ui/repo/published/network/toolkit/

I’ve been testing the network_backup.yml playbook against a Cisco 9300 and a 3850 switch to backup the configuration and copy it to a repository. It uses the cisco.ios collection and works really well in Ansible Automation Platform Controller 4.4.5 running on RHEL 9.2
However, the same exact set up fails in AWX 23.4.0 running on Ubuntu 22.04.1 LTS

Here is the error:

The full traceback is:
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/ansible/executor/task_executor.py", line 165, in run
    res = self._execute()
  File "/usr/local/lib/python3.9/site-packages/ansible/executor/task_executor.py", line 608, in _execute
    socket_path = start_connection(self._play_context, options, self._task._uuid)
  File "/usr/local/lib/python3.9/site-packages/ansible/executor/task_executor.py", line 1230, in start_connection
    write_to_file_descriptor(master, options)
  File "/usr/local/lib/python3.9/site-packages/ansible/module_utils/connection.py", line 58, in write_to_file_descriptor
    src = cPickle.dumps(obj, protocol=0)
  File "/usr/lib64/python3.9/copyreg.py", line 71, in _reduce_ex
    state = base(self)
RecursionError: maximum recursion depth exceeded while getting the str of an object

I also tried it in AWX 23.5.1 and I’m getting the same error. I’m just checking to see if anyone can point me in the right direction. Thanks.

What execution environment are you using in AWX?

I’m using AWX EE (latest)
I understand that you can use Ansible Builder to create your own EE. But, I’m still reading about it and haven’t attempted to create one yet. I don’t understand how to figure out which requirements and dependencies I would need for an EE to support Cisco devices. Can I download a pre-made one somewhere?

I found this for that Network Toolkit on the dependencies tab:

Dependencies
This collections requires the following collections for use

cisco.ios: >=2.2.0
arista.eos: >=2.1.2
ansible.utils: >=2.2.0
junipernetworks.junos: >=2.2.0

I guess I’d need to create an EE and force those module versions?

I got it working with AWX. It looks like there’s an execution environment made specific for this toolkit:

2 Likes

Hello @aaroncoulter, it’s wonderful to see that you managed to solve the problem independently!

Would you mind marking the post you found most helpful with a ‘solved’ check? This way, others browsing the Get Help category can benefit from your solution. Thank you very much in advance!

1 Like

Ah yes, sorry about that.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.