docs/docsite/rst/dev_guide/developing_modules_in_groups.rst
.. _developing_modules_in_groups:
Creating a new collection
Starting with Ansible 2.10, related modules should be developed in a collection. The Ansible Core team and community compiled these module development tips and tricks to help companies developing Ansible modules for their products and users developing Ansible modules for third-party products. See :ref:developing_collections for a more detailed description of the collections format and additional development guidelines.
.. contents:: :local:
.. include:: shared_snippets/licensing.txt
This list of prerequisites is designed to help ensure that you develop high-quality modules that work well with ansible-core and provide a seamless user experience.
developing_modules_general; paying particular focus to the :ref:developing_modules_checklist.testing_pep8 for more information.Python 2.6+ and Python 3.5+ <developing_python_3>.developing_testing.Fully Qualified Collection Names (FQCNs) for plugins and modules include three elements:
_) charactercommand not commandsFor example, community.mongodb.mongodb_linux or cisco.meraki.meraki_device.
It is convenient if the organization and repository names on GitHub (or elsewhere) match your namespace and collection names on Ansible Galaxy, but it is not required. The plugin names you select, however, are always the same in your code repository and in your collection artifact on Galaxy.
Circulating your ideas before coding helps you adopt good practices and avoid common mistakes. After reading the "Before you start coding" section you should have a reasonable idea of the structure of your modules. Write a list of your proposed plugin and/or module names, with a short description of what each one does. Circulate that list on the :ref:Ansible Forum<ansible_forum> so the Ansible community can review your ideas for consistency and familiarity. Names and functionality that are consistent, predictable, and familiar make your collection easier to use.
.. _developing_in_groups_support:
Ansible has a thriving and knowledgeable community of module developers that is a great resource for getting your questions answered. Visit the :ref:Ansible communication guide<communication> for details.
Your collection should include the following files to be usable:
__init__.py file - An empty file to initialize namespace and allow Python to import the files. Required/plugins/modules/$your_first_module.py. Required/plugins/doc_fragments/$topic.py files - Code documentation, such as details regarding common arguments. Optional/plugins/module_utils/$topic.py files - Code shared between more than one module, such as common arguments. OptionalWhen you have these files ready, review the :ref:developing_modules_checklist again. If you are creating a new collection, you are responsible for all procedures related to your repository, including setting rules for contributions, finding reviewers, and testing and maintaining the code in your collection.
We realize this may be your first use of Git or GitHub. The following guides may be of use:
How to create a fork of ansible/ansible <https://help.github.com/articles/fork-a-repo/>_How to sync (update) your fork <https://help.github.com/articles/syncing-a-fork/>_How to create a Pull Request (PR) <https://help.github.com/articles/about-pull-requests/>_