Move an existing collection to the new GitHub path

I want to transfer a collection to a new GitHub address, but I don’t want to modify the content of the collection or change its name. Because this GitHub address is related to the set in docs.ansible.com, when I modify the GitHub address of the set, it will cause the association in docs.ansible.com to become invalid. What should I do to ensure that the GitHub path in docs.ansible.com can be modified simultaneously?

Generally changing the GitHub path (or even moving it to another hosting service) doesn’t matter, because Ansible Galaxy doesn’t use the path, it only allows you to provide it in galaxy.yml so the users can easily find it from the Galaxy UI. So updating the path in galaxy.yml (and docs/docsite/config.yml, if you use that config file) is enough. Once you do a new release, the paths on Galaxy will be updated.

But you’re apparently asking about a collection included in the Ansible community package. (The only collections shown on docs.ansible.com are the collections included in the Ansible community package.) The Git repository URLs included in docs.ansible.com are taken from galaxy.yml resp. docs/docsite/config.yml of the collection that’s included in the respective Ansible version. So once you create a new release of the collection, and a new Ansible release is made that includes that version, the URLs on docs.ansible.com are updated.

Please note that the Git repository URLs of these collections are also tracked in ansible-build-data/11/collection-meta.yaml at main · ansible-community/ansible-build-data · GitHub (for Ansible 11) and ansible-build-data/12/collection-meta.yaml at main · ansible-community/ansible-build-data · GitHub (for Ansible 12) for the Ansible build. We would appreciate it if you could create a PR to update the paths in these two files, or alternatively create an issue in that repository informing us about the new path so we can update these files together with a new release of your collection.

(If there are no other changes in the collection, I’d do a bugfix release with release note “Maintenance release to update GitHub paths” or something like that.)

1 Like

Thank you very much for your reply.

Just for your information, it looks like the Ansible community team at Red Hat is planning to migrate docs.ansible.com to ansible.readthedocs.io.

This shouldn’t make any difference to you. Everything should work as @felixfontein explained. I just wanted to make you aware of this.

1 Like