creating an execution environment gives me "ERROR: Double requirement given: ansible-pylibssh"
Hello,
I'm on Ansible Automation Platform 2.4-7. I would like to add community.postgresql to my execution environment.
First I ran a build without any additional dependencies to see if my process works:
execution-environment.yml
---
version: 3
images:
base_image:
name: registry.redhat.io/ansible-automation-platform-24/ee-supported-rhel8:latest
dependencies:
galaxy: []
python: []
system: []
options:
# avoid: "/output/scripts/assemble: line 75: /usr/bin/dnf: No such file or directory"
package_manager_path: /usr/bin/microdnf
This led to a working EE.
Then I changed execution-environment.yml
dependencies:
galaxy: requirements.yml
python: []
system: []
and provided requirements.txt
---
collections:
- name: community.postgresql
Running "ansible-builder build -v 3" now gives me:
...
+ /usr/bin/python3 -m pip install --cache-dir=/output/wheels -r /tmp/src/requirements.txt
WARNING: Running pip install with root privileges is generally not a good idea. Try `python3 -m pip install --user` instead.
ERROR: Double requirement given: ansible-pylibssh (from -r /tmp/src/requirements.txt (line 25)) (already in ansible-pylibssh>=0.2.0 (from -r /tmp/src/requirements.txt (line 6)), name='ansible-pylibssh')
I exported the unfinished image and looked for ansible-pylibssh:
$ grep -n ansible-pylibssh tmp/src/requirements.txt
6:ansible-pylibssh >= 0.2.0 # from collection ansible.netcommon
25:ansible-pylibssh # from collection arista.eos
27:ansible-pylibssh # from collection cisco.asa
35:ansible-pylibssh # from collection cisco.iosxr
44:ansible-pylibssh # from collection junipernetworks.junos
72:ansible-pylibssh # from collection vyos.vyos
So requiring something with a minimum version number and later without a version number seems to provoke a "double requirement".
Checking ansible.netcommon/requirements.txt says that the minimum version number is there since Mar 1, 2021. So this is not a newly introduced bug.
Anyone has an idea why this fails?
Regards,
Robert