ansible / awx-ee

An Ansible execution environment for AWX project
https://quay.io/ansible/awx-ee
Other
133 stars 156 forks source link

add netaddr library to awx-ee #90

Open cerberek opened 2 years ago

cerberek commented 2 years ago

Having error The ipaddr filter requires python's netaddr be installed on the ansible controller

Issue at awx was closed without any action https://github.com/ansible/awx/issues/10370#issue-913384761

bubulak commented 2 years ago

This works for me: 1) add line to _build/bindep.txt "python3-netaddr [platform:rpm]" 2) add line to _build/requirements.yml " - name: ansible.netcommon"

liviozanol commented 2 years ago

This is really sad.... There should be a way to custom specify a requirements.txt with custom python modules/packages (not only collections) and EE could run this on execution time.

BTW, if you create a task inside the playbook that installs a module using pip, it will work withou needing to create a custom EE.... IE:

      - name: pip install netaddr (really disagree how red hat manage their products...). Either I do this or create a custom Execution Enviroment....
        ansible.builtin.shell: pip install netaddr
        delegate_to: 127.0.0.1

Also, please keep in mind that Ansible was initially created to automate network devices! How you do complex automation tasks without netaddr package?

Please, reconsider this

keliansb commented 2 years ago

Sadly your suggestion @liviozanol is not working for me, I have the following warning :

Defaulting to user installation because normal site-packages is not writeable.
WARNING: The script netaddr is installed in '/home/runner/.local/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
misbahulard commented 2 years ago

Any update about this issue? I think this pull request may fix it but has not been reviewed yet #92.

misbahulard commented 2 years ago

Any update about this issue? I think this pull request may fix it but has not been reviewed yet #92.

I just create the custom AWX EE for a temporary solution, feel free to use the images here: Docker Hub

The changes are exactly the same as those made in Pull Request #92.

yaldhamary commented 2 years ago

Hi there, I have a custom awx ee I used for network automation projects that contain the netaddr python module and the ansible.netcommon collection. you can install the image from here AWX EE image