I have a use case where I need to install a number of collections with ansible-galaxy. This process needs to happen many times, into various locations, but on the same machine.
To avoid downloading things from https://galaxy.ansible.com repeatedly, I am looking into ways to improve this.
The obvious thing to consider is to use ansible-galaxy collection download. That works, and now I have my collections locally, and I can install those.
BUT, each time I run ansinble-galaxy collection download, with the same requirements file, this downloads everything.
This obviously defeats what I’m trying to do…
I was hoping this would work similar to say, python’s pip which by default will cache all content in a single location locally, and use that on subsequent installs, and only download things that are not available locally.
Is there a way to make ansible-galaxy behave like this?
BTW such a feature would greatly reduce the burden on https://galaxy.ansible.com, which we know suffers from time to time…