"ansible-galaxy collection download" always downloads?

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…

There’s some HTTP cache, at least. But I think we might download the collections themselves. Feel free to file a feature request on the tracker.

Though, there’s room for discussion — pip has cache for wheels but its download command is meant for placing them into requested places on disk. I’d also be concerned about the disk space consumption as some projects can be rather big.

thx, I just added "ansible-galaxy collection download" always downloads content · Issue #3562 · ansible/galaxy · GitHub

That’s the web service repo. You want ansible/ansible for the CLI.

Right. Created 'ansible-galaxy collection download' always downloads · Issue #86233 · ansible/ansible · GitHub instead