Issue #7686
closedrequirements.yml is not compatible with ansible-galaxy
Description
source should not require /v(d)/collections endpoint from: https://github.com/ansible/ansible/blob/devel/lib/ansible/cli/galaxy.py#L522-L549
source: the URL or a predefined source name that relates to C.GALAXY_SERVER_LIST
Notes:
- Include field at Validation Error messages
- remote URL should be API root
Related issues
Updated by newswangerd almost 4 years ago
Here's a sample requirements.yml that should work
collections:
- name: amazon.aws
source: https://galaxy.ansible.com
version: 1.2.1
- name: junipernetworks.junos
source: https://galaxy.ansible.com
- name: f5networks.f5_modules
source: https://galaxy.ansible.com
Updated by bmbouter almost 4 years ago
- Has duplicate Issue #7711: pulp_ansible could not determine API version for url with 'api/v2' appended added
Updated by bmbouter almost 4 years ago
Here's what I think needs to be done for this ticket:
From a high level we need to accept data just like the CLI does: https://docs.ansible.com/ansible/latest/user_guide/collections_using.html#configuring-the-ansible-galaxy-client
To do that effectively we need to accept remote.url and remote.requirements_file differently.
I think tests would make developing this easier, so I suggest make or update some tests:
- One that uses the requirements file from comment #3 as the requirements file
- One that uses a url like
https://galaxy.ansible.com
(the new style) - One that uses a url like we used to use
https://galaxy.ansible.com/api/v2/collections/
and ensure it's rejected
In terms of migrations, maybe we need a migration? I don't think we should support the old-style data, but maybe refuse to sync with it if it's present and not ship a migration ... ?
I think the sync machinery is what needs to be updated. I think doing this only for CollectionRemote is ok, RoleRemote can continue to be whatever it is unless it's easier to also update that one.
Updated by daviddavis almost 4 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to daviddavis
Updated by daviddavis almost 4 years ago
We don't support requirements files for RoleRemote. That field is only on CollectionRemotes.
For the requirements file, we need to support two formats for collections: name.collection and a dict with name/version/source/etc
Noticed that the ansible-galaxy cli will try to append 'api' to the end of the URL as well:
Updated by daviddavis almost 4 years ago
- Related to Issue #7734: Validate the requirements.yml file added
Updated by pulpbot almost 4 years ago
- Status changed from ASSIGNED to POST
Added by daviddavis almost 4 years ago
Updated by daviddavis almost 4 years ago
- Status changed from POST to MODIFIED
Applied in changeset pulp_ansible|63b475516b7927e650a71ab03ba81b47baff3b93.
Updated by pulpbot almost 4 years ago
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
Changing format for api urls
fixes #7686