80e7e1a17c
* Due to the takeover of freenode we're moving to a different irc network. * Our channels updated to point at the same channel name on libera.chat * Some links went to webchat.freenode.net. At this time, libera.chat doesn't point you to an official webchat client so I changed these to https://libera.chat. (kiwi irc does work with libera.chat so that could be another option). * In general, I used the name irc.libera.net for link names and https://libera.chat for link targets. This is because the irc service is hosted on irc.libera.chat but the project web server is hosted on libera.chat. (This appears to also be true for freenode but we were using http://irc.freenode.net which doesn't seem to work. Oops). * Removed http://irc.freenode.net from the linkcheck exceptions. linkcheck was actually correct to flag that as invalid (should have been http://frenode.net instead). * Looks like hte important people in #yaml are now in libera.chat * Link to where contributors should get help Add a link target and then link to where contributors should get support for developing groups of modules. * Update docs/docsite/rst/dev_guide/developing_modules_in_groups.rst Co-authored-by: Felix Fontein <felix@fontein.de> Co-authored-by: John R Barker <john@johnrbarker.com> Co-authored-by: Felix Fontein <felix@fontein.de>
59 lines
3 KiB
ReStructuredText
59 lines
3 KiB
ReStructuredText
.. _hacking_collections:
|
|
|
|
***************************
|
|
Contributing to collections
|
|
***************************
|
|
|
|
If you want to add functionality to an existing collection, modify a collection you are using to fix a bug, or change the behavior of a module in a collection, clone the git repository for that collection and make changes on a branch. You can combine changes to a collection with a local checkout of Ansible (``source hacking/env-setup``).
|
|
You should first check the collection repository to see if it has specific contribution guidelines. These are typically listed in the README.md or CONTRIBUTING.md files within the repository.
|
|
|
|
Contributing to a collection: community.general
|
|
===============================================
|
|
|
|
These instructions apply to collections hosted in the `ansible_collections GitHub org <https://github.com/ansible-collections>`_. For other collections, especially for collections not hosted on GitHub, check the ``README.md`` of the collection for information on contributing to it.
|
|
|
|
This example uses the `community.general collection <https://github.com/ansible-collections/community.general/>`_. To contribute to other collections in the same GitHub org, replace the folder names ``community`` and ``general`` with the namespace and collection name of a different collection.
|
|
|
|
Prerequisites
|
|
-------------
|
|
|
|
* Include ``~/dev/ansible/collections/`` in :ref:`COLLECTIONS_PATHS`
|
|
* If that path mentions multiple directories, make sure that no other directory earlier in the search path contains a copy of ``community.general``.
|
|
|
|
Creating a PR
|
|
-------------
|
|
|
|
|
|
|
|
* Create the directory ``~/dev/ansible/collections/ansible_collections/community``::
|
|
|
|
mkdir -p ~/dev/ansible/collections/ansible_collections/community
|
|
|
|
* Clone `the community.general Git repository <https://github.com/ansible-collections/community.general/>`_ or a fork of it into the directory ``general``::
|
|
|
|
cd ~/dev/ansible/collections/ansible_collections/community
|
|
git clone git@github.com:ansible-collections/community.general.git general
|
|
|
|
* If you clone from a fork, add the original repository as a remote ``upstream``::
|
|
|
|
cd ~/dev/ansible/collections/ansible_collections/community/general
|
|
git remote add upstream git@github.com:ansible-collections/community.general.git
|
|
|
|
* Create a branch and commit your changes on the branch.
|
|
|
|
* Remember to add tests for your changes, see :ref:`testing_collections`.
|
|
|
|
* Push your changes to your fork of the collection and create a Pull Request.
|
|
|
|
You can test your changes by using this checkout of ``community.general`` in playbooks and roles with whichever version of Ansible you have installed locally, including a local checkout of ``ansible/ansible``'s ``devel`` branch.
|
|
|
|
.. seealso::
|
|
|
|
:ref:`collections`
|
|
Learn how to install and use collections.
|
|
:ref:`contributing_maintained_collections`
|
|
Guidelines for contributing to selected collections
|
|
`Mailing List <https://groups.google.com/group/ansible-devel>`_
|
|
The development mailing list
|
|
`irc.libera.chat <https://libera.chat/>`_
|
|
#ansible IRC chat channel
|