AAP2, installing a collection from a requirements.yml

Hello guys, please allow me a quick question about the collections/requirements.yml file you can put in a project to download collections dependencies, in an AAP2 context.

For example, let’s consider this one :

---
collections:
  - name: community.general
    type: git
    source: https://gitlab.com/myurl/community-general-9.0.1

First, is it possible to point directly to a tar.gz file hosted in a git repository, rather than a repo where the collection has been uncompressed ?

Second, how do you handle the case where the collection is hosted in a repo which necessites credentials different from those of the main repo, where the projects and requirements file are hosted ? In AAP2, as fars as i could see, you can only put one SCM credential for a project. May be by defining a custom credential ?

thanks in advance if you have lights on these topics,
johan

  1. I believe you can if you use type url. Installing collections — Ansible Community Documentation
  2. Since your using git, you would need to tell git which credentials to use for each repo. See these docs here for some options Installing collections — Ansible Community Documentation
    I think I would try using an ssh_config file on the ansible controller/execution env to control what credentials are used but ive never actually done it.
1 Like

hello,
Thank you, for 1. I realize that I made an error when trying to download from an url (I didn’t change the type, leaving it to file).
For the 2., i will need a bit of time - that i haven’t currently - to play with ssh_config, but I keep that in mind,; thanks !