Internal ansible-galaxy

Is it possible to get ansible-galaxy like functionality in a closed ecosystem? This would be particularly useful for enterprise environments where there’s an internal git repo, with multiple teams trying to share roles.

Ideally, something like the public facing API server that can be run internally, but I’d settle for some interim solution like having roles on a shared filesystem.

galaxy supports passing a scm or tarball uri, which would allow you to
host the modules privately.

Installation is fine. The problem I'm having is that I'm unable to run ansible-galaxy init mymodule --force, which does try to contact the api server. Are there any docs for doing what the init does manually?

Note: when Brian mentioned galaxy and URIs above, that means the ansible-galaxy requirements file, for the CLI – the public site does require git.

As for the --init and so forth, we do need to make galaxy-init not contact the metadata server. If this is something you’d like to work on, patches would be welcome, otherwise make sure we have a ticket and we can take care of that.

init just creates a skeleton for the module, it contacts the server to
download the default files.

Right, I am suggesting we code the default templates in the program itself – there’s a design point that the existing method allows it easier to change the defaults, true… but there are tradeoffs.

So presumably I could just copy the defaults into the repo manually, where do these files live currently?

Here’s all of the Ansible-galaxy CLI source:

https://github.com/ansible/ansible/blob/devel/bin/ansible-galaxy

Looks like you just need to pass --offline although it would be nice if the API config check didn’t happen for the init task, and that’s easily switchable.

It appears we are already using local templates.